如何用svg制作弯曲波

时间:2017-12-22 13:34:13

标签: html svg

我正试图用svg制作弯曲的波浪。我已经创造了一个水波,但最后应该有第二个弯曲的波浪。

这就是我现在所拥有的:enter image description here

这是它应该是这样的: enter image description here

我怎样才能做到这一点?

这是我已有的代码:

<svg class="four" viewBox="0 0 500 500" preserveAspectRatio="none">   
            <path d="M0,100 C100,200 350,0 300,100 L500,0 L0,0 Z" style="stroke: none; fill:#1e90ff;"></path>
         </svg>

1 个答案:

答案 0 :(得分:2)

path的最后一位使用二次Bézier曲线,如下所示:

<path d="M0,100 C150,200 350,0 300,100 Q400,25 500,25 L500,0 L0,0 Z" 
style="stroke: none; fill:#1e90ff;"></path>
</svg>