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? . .
伊谢尔伦2017-06-17 09:18:40
//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?
阿神2017-06-17 09:18:40
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.