【发布时间】:2020-07-22 05:37:53
【问题描述】:
我想添加一个应该在顶部和底部向内弯曲的部分,在背景中有一个图像。我尝试使用 svg 和路径,但无法获得所需的结果。
我在图片链接下方插入了我想要的结果。
section {
padding: 60px 0;
position: relative;
}
<section id="statistics" data-dir="up" style="background-image: url(https://hero.jpg); background-size: cover; background-position: center; background-attachment: fixed;" class="statistics-section text-white parallax">
<svg id="bigHalfCircleCandy" version="1.1" width="100%" height="100" viewBox="0 0 100 100" preserveAspectRatio="none" style="fill:#ffffff;padding:0;">
<path d="M0 0 C55 180 100 0 100 0 Z"></path>
</svg>
</section>
【问题讨论】: