Html 目标 safari css,但不是 chrome
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23300412/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 01:38:53 来源:igfitidea点击:
Target safari css, but not chrome
提问by user3353748
Ran into a problem, where chrome and safari display margin differently. But both of them are webkit, so can't really use a prefix. Is there any solution, or hack that could help with it?
遇到一个问题,chrome 和 safari 显示边距不同。但是它们都是webkit,所以不能真正使用前缀。有什么解决方案或黑客可以帮助解决这个问题吗?
回答by user3353748
Found somewhere else here. worked fine for me
在这里其他地方找到的。对我来说很好用
@media screen and (-webkit-min-device-pixel-ratio:0) {
/* Safari and Chrome */
.myClass {
color:red;
}
/* Safari only override */
::i-block-chrome,.myClass {
color:blue;
}
}