嗨,我有这个问题,我的边框显示在Firefox和Chrome中。它在Safari中看起来很好。
小提琴/现场演示:http://jsfiddle.net/hirokotenshi/JhfS8/
Chrome和Firefox上的那个看起来有些参差不齐。
这里:http://i923.photobucket.com/albums/ad77/Chapter-s/Screenshot2013-03-26at43905PM_zps5d62d1c9.png
我的CSS:
#whatsnew {
margin-top: 50px;
border: 1px solid #D9D9D9;
border-right: 50px solid #d52b1e;
padding: 35px;
-webkit-font-smoothing: antialiased;
font-smoothing: antialiased;
font-family: Verdana;
padding-top: 20px;
padding-bottom: 15px;
}有人知道我如何解决这个问题吗?
发布于 2013-03-26 17:28:46
这实际上是设计上的-边框是在角落对角连接的,所以你看到的是右边边框的边缘逐渐变细,以与其他1px的边缘相接。
我能想到的最好的解决方案是使用包装器div,对其应用1px边框,然后将红色边框保留在内部div中:
HTML:
<div id="wrapper">
<div id="whatsnew">
<div id="whatsnewtitle">What's new?</div>
<div id="whatsnewcon">
<b>Do you know?</b><br />
<br />
Royal Dutch Shell plc filed its Annual Report on Form 20-F for the year ended December 31, 2012 with the U.S. Securities and Exchange Commission.
<br />
<br />
<div style="text-align: right;">
<a href=""><b>Find out more...</b></a>
</div>
</div>
</div>
</div>CSS:
#wrapper {
border: 1px solid #D9D9D9;
margin-top: 50px;
-webkit-font-smoothing: antialiased;
font-smoothing: antialiased;
font-family: Verdana;
}
#whatsnew {
border-right: 50px solid #d52b1e;
padding: 35px;
padding-top: 20px;
padding-bottom: 15px;
}http://jsfiddle.net/JhfS8/1/
(快速而肮脏的黑客攻击...)
如果您想避免包装器右侧的灰色边框,也可以将其更改为红色:
border-right-color: #d52b1e;..。如果你想变得非常聪明,你可以使用position: relative和负边距把内部的拉回到边框上,这样灰色就会消失在红色后面:
http://jsfiddle.net/JhfS8/2/
发布于 2013-03-26 17:10:45
尝试:-webkit-backface-visibility: hidden;或-webkit-transform-style: preserve-3d;,或者在backface-visibility填充之外添加一些填充
https://stackoverflow.com/questions/15632999
复制相似问题