[英]CSS - background-color not working in safari
I am using bootstrap on my site and have a few buttons with class="btn btn-dark"
.我在我的网站上使用引导程序,并且有几个带有class="btn btn-dark"
按钮。
I have changed the color in my own css.我在自己的 css 中更改了颜色。
First I tried hex values .btn-dark{background-color:#343a40;border-color:#343a40;}
首先我尝试了十六进制值.btn-dark{background-color:#343a40;border-color:#343a40;}
Then I tried rgba values .btn-dark{background-color:rgba(52,58,64,1);border-color:rgba(52,58,64,1)}
然后我尝试了 rgba 值.btn-dark{background-color:rgba(52,58,64,1);border-color:rgba(52,58,64,1)}
Then after a bit of research I seen that it may be something to do with transparency in safari so added opacity:1;
然后经过一些研究,我发现这可能与 Safari 中的透明度有关,因此添加了opacity:1;
but no joy.但没有快乐。
It's fine in chrome, firefox, edge, uc browser and opera.在 chrome、firefox、edge、uc 浏览器和opera 中都很好。
But in safari they look like this:但在 safari 中,它们看起来像这样:
I am a windows user so trying to test this in the last version of safari available for windows (5.1.7) so I can't do much.我是 Windows 用户,因此我试图在适用于 Windows (5.1.7) 的最新版本的 safari 中对此进行测试,因此我无能为力。
First of clear your cashes than, use background:#343a40;首先清除你的现金比,使用背景:#343a40; like this... I think so your problem will be solved像这样......我想你的问题会得到解决
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.