Fill a div with a wavy border SVG path

前端 未结 2 1108
你的背包
你的背包 2021-01-18 23:14

I want to fill the

with the color and add shadow to the border but my code is doing this. I actually need it in the way shown in the image.

2条回答
  •  长发绾君心
    2021-01-18 23:40

    For such a shape, you can use an svg pattern and fill a rectangle width the pattern as shown in the following example :

    html,body{margin:0;padding:0;}
    div{
      background: url('http://i.imgur.com/qi5FGET.jpg');
      background-size:cover;
      overflow:hidden;
    }
    svg{display:block;}

    title

    whatever content
    with several lines

提交回复
热议问题