gpt4 book ai didi

html - CSS div 椭圆形

转载 作者:可可西里 更新时间:2023-11-01 13:00:08 27 4
gpt4 key购买 nike

oval shape example image

谁能帮我从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/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com