【发布时间】:2014-02-20 18:05:16
【问题描述】:
我有一个 div 作为内容框,并且在其中有另一个 div 作为标题。外部 div 设置了边框半径,但内部 div 隐藏了它。
HTML:
<div id='box'>
<div id='boxTitle'>
This is the title
</div>
</div>
CSS:
#box {
height: 250px;
width: 250px;
border-radius: 10px;
background: #bbb;
}
#boxTitle {
width: 100%;
background: #000;
color: #fff;
text-align: center;
}
JSFiddle:http://jsfiddle.net/AAUbA/
如何修复它以便我可以看到外部顶部的圆角?
【问题讨论】:
-
你可以把border-top-left和border-top-right放到
#boxTitle.