CSS3 Border-Radius 的一个边框颜色不同,正在渗色
我有一个使用边框半径的带有圆角的流体宽度 div,以及 div 一侧颜色不同的大边框。
当浏览器窗口足够小时,边框都会按其应有的方式运行。然而,当我放大窗口大小时,我开始看到颜色在 div 中心渗出。
我想知道是否有人知道可能的解决方案。
div 有两个类:
.info-box {边框:1px 实心#CCC;下边距:15px; -moz-边框半径:6px; -webkit边框半径:6px;边框半径:6px;背景:#F3F3F3;}
.seller-msg {border-left: 7pxsolid #EF831B;}
似乎 div 的高度也以某种方式影响它。
屏幕截图
I have a fluid-width div with rounded corners using the border-radius, as well as a large border on one-side of the div colored differently.
When the browser window is small enough, the borders all behave as it should. However, when I enlarge the window size, I start to see the color bleed through in the center of my div.
I was wondering if anyone had an idea of a possible solution could be.
The div has two classes:
.info-box {border: 1px solid #CCC; margin-bottom: 15px;
-moz-border-radius: 6px;
-webkit-border-radius: 6px; border-radius: 6px; background: #F3F3F3;}.seller-msg {border-left: 7px solid #EF831B;}
It seems like the height of the div is also affecting it as well somehow.
Screenshot
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Crikey,看来您发现了 WebKit 错误。讨厌的一个。
我能想到的最好的解决方法是在
.seller-msg
内添加一个额外的(哇,这又像 IE6),并且将灰色细边框放在
上。
希望有人能想出更好的东西。
如果您想向 WebKit 团队报告错误,请参阅此处详细步骤:
我已经下载了最新的每晚版本 (r106067当时在 Mac OS X 上的写作),并且该错误也存在于此处:
我'我还对“border-radius color”进行了 Bugzilla 搜索,但我看不到任何与此匹配的错误。
Crikey, looks like you’ve found a WebKit bug. Nasty one.
The best I can come up with for a workaround is to add an extra
<div>
(whee, it’s like IE6 all over again) inside.seller-msg
, and put the thin grey border on that<div>
instead.Hopefully someone can come up with something better.
If you wanted to report the bug to the WebKit team, the procedure is detailed here:
I’ve downloaded the latest nightly build (r106067 on Mac OS X at time of writing), and the bug is present there too:
I’ve also done a Bugzilla search for “border-radius color”, and I can’t see any bugs that match this one.