【发布时间】:2011-09-02 22:00:38
【问题描述】:
如果position:relative;,圆角无法截断 webkit 浏览器(例如 Chrome)中的内容
看到这个demo。
HTML:
<div class="outer">
<div class="inner">
</div>
<div>
CSS:
.outer {
background:yellow;
border:solid 1px black;
position:relative;/* Setting this means rounded corners don't cut off content! */
overflow:hidden;
-moz-border-radius: 12px;
border-radius: 12px;
}
.inner {
background:red;
height:50px;
}
有人知道解决办法吗?谢谢-
【问题讨论】:
-
使用 FF4 对我来说工作正常。你使用的是什么浏览器?此外,您可以尝试在 div 中添加 2px 填充。
-
@Bryce- 正如我在问题中所说,这是 Webkit (Chrome) 的问题,而不是 Gecko (FF4) 浏览器的问题。
-
这是 webkit 中的一个错误。您可以在bugs.webkit.com 提交票证吗?
-
更正保罗的链接..它是bugs.webkit.org,你可以在这里提交票
标签: html css webkit rounded-corners