html - Elements display differently in Google and Firefox browsers. Want to use a css hack to solve it?
淡淡烟草味
淡淡烟草味 2017-06-17 09:16:40
0
2
981

The height of the p element is displayed differently in Google and Firefox browsers. I want to use css hack to solve it.

But these two pieces of code don't work. Can someone explain it to me? . .

淡淡烟草味
淡淡烟草味

reply all(2)
伊谢尔伦
//google

@media screen and (-webkit-min-device-pixel-ratio:0}{

            tr { 
            height: 30px;
             }
        }

//firefox

@-moz-document url-prefix() {
          tr {
             height: 40px;
          }
        }

Isn’t this compatible way of writing height?

阿神

Height does not have prefixes like -webkit or -moz, so there should be no compatibility issues with height.
What you are asking about is that the p screenshot is tr. I don’t know if there are other elements in your p, and you are sure it is not due to internal elements.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template