.Emoji
{
 cursor: pointer;
 float: right;
 height: 25px;
 margin-right: 5px;
 margin-top: -21px;
  position: relative;
 right: -12px;
 text-decoration: none;
 width: 23px;
 z-index: 40000;
 background-image: url("/images/globaleImg.png");
 background-position: -136px -387px;
 background-repeat: no-repeat;
 background-size: auto auto;
}


在firefox和IE中,如果图像在正确的位置但在chrome中,则位置不正确


在chrome中,它看起来像这样:



我如何在不创建新的CSS文件的情况下修复适合Firefox和Chrome的类

最佳答案

人们通常对此并不满意,但有时需要使用特定于浏览器的CSS:
@media屏幕和(-webkit-min-device-pixel-ratio:0)

但是我建议先建立为firefox和chrome标准,然后再建立为IE,因为chrome和firefox现在比IE集体使用更多,它们也更灵活

10-05 20:19
查看更多