简体   繁体   English

CSS3边框半径背景重叠

[英]CSS3 border-radius background overlap

In a rounded-corner container I want the first div to be of another background color from the other divs. 在圆角容器中,我希望第一个div具有其他div的另一种背景颜色。 The problem I have is that the background of the first div overlaps the rounded corner. 我的问题是,第一个div的背景与圆角重叠。 I did a test to show the problem: http://www.webdevout.net/test?025 The problem occurs in Chrome and FF. 我做了测试以显示问题: http : //www.webdevout.net/test?025该问题发生在Chrome和FF中。

add the following lines to your box-header-bug class 将以下行添加到box-header-bug类

border-radius: inherit;
-moz-border-radius: inherit;

UPDATE: 更新:

border-top-left-radius: inherit;
border-top-right-radius: inherit;

看起来您需要为内部div box-header-bug赋予左上和右上的边框半径:

-moz-border-radius: 5px 5px 0 0;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM