Generally, when we write CSS, the numbers are all integers, such as font-size: 12px; margin: 20px; then someone may ask if the CSS attribute value can have a decimal point? What would it look like if it was a decimal number? What is the difference with integers?
First, let's take a look at an example to observe the differences between Decimals in different browsers.
<! Doctype HTML> <HTML lang = "En-us">
We can see that in chrome, Firefox, and IE8, decimal places are rounded to integers, while in IE6 and IE7, the lower limit of decimal places is rounded to integers. In some cases, we use decimal places to replace CSS hack. For example:
<! Doctype HTML> <HTML lang = "En-us">
It not only shortens the code length, but also removes CSS hack.
Conclusion: although this decimal point solves some compatibility problems, its disadvantage is also obvious, that is, its applicability can only solve the browser difference of 1 pixel difference, and can only solve IE6, browser differences with a smaller value of 1 pixel in IE7.
Browsers: chrome, Firefox, IE8, IE7, and IE6