Target safari css, but not chrome [duplicate]

2020-03-02 02:31发布

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?

1条回答
Juvenile、少年°
2楼-- · 2020-03-02 03:14

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;
}
}
查看更多
登录 后发表回答