【发布时间】:2015-05-05 19:35:39
【问题描述】:
如何通过简单的带有 css 的 DIV 来实现这一点?
HTML:
<div class="curv">
<div class="holder"></div>
</div>
CSS:
.curv{
width: 800px;
margin: 0 auto;
position: relative;
padding-top: 100px;
overflow: hidden;
}
.curv:before{
background: #333;
width: 100%;
height: 200px;
left: 0px;
right: 0px;
top: 0px;
content: '';
position: absolute;
border-radius: 100% 100% 0 0;
}
.holder{
width: 100%;
height: 200px;
background: #333;
position: relative;
z-index: 9999;
}
【问题讨论】:
-
@JoshCrozier 更新了问题。希望这比以前描述得更好。如果您认为好,请您投票。谢谢
标签: css css-shapes