简体   繁体   中英

CSS - background-color not working in safari

I am using bootstrap on my site and have a few buttons with class="btn btn-dark" .

I have changed the color in my own css.

First I tried hex values .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)}

Then after a bit of research I seen that it may be something to do with transparency in safari so added opacity:1; but no joy.

It's fine in chrome, firefox, edge, uc browser and opera.

But in safari they look like this: 在此处输入图片说明

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.

First of clear your cashes than, use background:#343a40; like this... I think so your problem will be solved

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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