1

I have in my css this class:

.middleContent { overflow: hidden; display:inline-block; }

This works in I.E. but not in FF or Chrome so I wrote this out and just wanted to do a sanity check here because I am not sure how to write this out and might need direction.

To leave it working in I.E. I left the above line:

.middleContent { overflow: hidden; display:inline-block; }

So for Firefox and Chrome do I add the following lines like this:

For Firefox:

@-moz-document url-prefix() { 
  .middleContent { overflow: hidden; }
}

For Chrome:

@media screen and (-webkit-min-device-pixel-ratio:0) {
 .middleContent { overflow: hidden; }
 }

Thanks for any help or advice on this.

4

1 回答 1

0

是的,你是对的。以 Chrome 为目标:

@media screen and (-webkit-min-device-pixel-ratio:0) { 
 div{top:0;} 
}

以任何 Firefox 为目标:

@-moz-document url-prefix() { 
      .selector {
         color:lime;
      }
    }
于 2015-10-06T19:34:57.860 回答