Han*_*com 7 css safari rounded-corners css3
使用Safari 6.0.1和以下样式,我的按钮以"错误"方式呈现:
此错误仅在Safari中发生.

.btn {
height: 40px !important;
line-height: 40px !important;
overflow: hidden;
padding: 0 20px;
text-align: center;
margin: 0 auto;
float: left;
margin-bottom: 40px;
background-color: #15518d;
background-repeat: no-repeat !important;
border-bottom: 4px solid #032a52 !important;
text-shadow: 0 0 3px rgba(0,0,0,.2);
color: #fff !important;
font-weight: 500;
font-size: 15px !important;
border-radius: 4px;
-webkit-background-clip: padding-box;
background-clip: padding-box;
text-transform: none !important;
cursor: pointer
}
Run Code Online (Sandbox Code Playgroud)
正如您所看到的,按钮的右边框似乎开始"重复",按钮的左边框具有一些应该只在底部的颜色.
有没有人遇到过这个bug或知道修复?谢谢!
小智 7
这是与启用硬件的Safari相关的错误.
你可以通过禁用Automatic Graphics Switching" Energy"in " "中的" System Preferences"进行验证(我假设你在Mac上,因为版本6+不适用于Windows AFAIK).
因为它需要在safari代码中修复它.
您可以将按钮存储为图像,它可以在所有浏览器中使用,旧的方式 - 更多的工作(和带宽),但稳定的结果.
可能解决方案
从这篇文章:在Safari中使用边界半径的965像素以上的杂散垂直线
添加-webkit-background-clip: padding-box;到您的CSS.