谁能帮我从div中剪出这样的一个?
找到了可能的解决方案,但不了解 SVG。也许有人可以帮助我。
HTML:
<svg viewBox="0 0 400 150">
<path opacity="0.6" fill="red" d="M0,10 Q0,0 10,0 Q195,40 390,0 Q400,0 400,10 Q390,75 400,140 Q400,150 390,150 Q195,100 10,150 Q0,150 0,140 Q10,75 0,10" />
</svg>
CSS:
svg {
position: relative;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
最佳答案
body {
overflow-x: hidden
}
svg {
left: 47%;
position: relative;
top: -24%;
transform: translate(-50%, -50%);
width: 2000px;
}
关于html - CSS div 椭圆形,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41053044/