我可以创建一个带有曲线底部的div吗? [英] Can I create a div with a Curved bottom?
本文介绍了我可以创建一个带有曲线底部的div吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
所以我在一个网站上工作,我想知道是否可能,纯粹使用HTML5,CSS3(和JavaScript,如果需要),做一个底部弯曲的div,因此它看起来像这样: p>
或者只能使用背景图片?
< body>
< div class =navbar navbar-fixed-top>
< div class =navbar-inner>
< ul class =nav>
< li>< a href =#>首页< / a>< / li&
< / ul>
< / div>
< / div>
< / body>
解决方案
CSS:
div {
background-color:black;
width:500px;
height:50px;
border-bottom-left-radius:50%;
border-bottom-right-radius:50%;
}
看到这是确定的: DEMO
So I'm working on a site and I was wondering if it's possible to, purely using HTML5, CSS3 (and JavaScript if needed), make a div with a curved bottom, so it will look practically like this:
Or can this only be done using a background image?
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<ul class="nav">
<li><a href="#">Home</a></li>
</ul>
</div>
</div>
</body>
解决方案
CSS:
div{
background-color:black;
width:500px;
height:50px;
border-bottom-left-radius:50%;
border-bottom-right-radius:50%;
}
see is this ok for you : DEMO
这篇关于我可以创建一个带有曲线底部的div吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文