On the same machine, with just one width setting, the widths displayed in three browsers are actually different. IE8 is the longest, followed by Firefox.
Because we need to put a picture, the size of the picture is 1050px. The effect is best under Chrome. Due to zooming in other browsers, the effect is not very clear.
How to solve it?
<div style="width:1050px;height:30px;background-color: blue"></div>
All assignments such as margin padding border and the like are set to 0
Then it will be compatible with the browser.
Correct answer on the first floor, because each browser has a default attribute when parsing tags. Margin, padding and border are the most common. Assigning all values to 0 can avoid problems.
will be different, some browsers will calculate the border into the width, and some will not.
Standing basic code. . . .
*{border:0;padding:0;margin:0;text-decoration:none;}
Newcomer, let’s go through the questions~ I’ve seen the fifth floor several times~ By the way, you seem to like that expression very much