[英]Creating a custom shape with border-radius
我用SVG解决了这个问题。
谢谢你和费耶拉!
html, body { margin: 0; } #shape { position: absolute; bottom: 0px; }
<svg id="shape" data-name="Form crop" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 928.08"><defs><style>.cls-1{fill:#ecdbb0;opacity:0.6;}</style></defs><title>shape</title><path class="cls-1" d="M2379.69,1551.29V623.21c-603.05,53.25-876.26,317.23-999.59,558.26l-0.41.8v369h1000Z" transform="translate(-1379.69 -623.21)"/></svg>
您可以使用伪元素
html, body { margin: 0; } .shape { height: 100vh; width: 100vw; position: relative; overflow: hidden; } .shape:before { content: ''; height: 250vh; width: 250vw; background-color: #ecdbb0; position: absolute; top: 20px; left: -20vw; border-radius: 50%; }
<div class="shape"></div>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.