Generally, we rarely see HR, but we may determine life and death at first sight. The same is true in HTML, which is not common to us, but it usually determines whether we can use the perfect dividing line at first sight. Here, I won’t attach the pictures, just list them for reference:
| Normal browser | IE6, 7 | Firefox | |
|---|---|---|---|
| Actual height | height + border-right-width + border-left-width | height | height |
| Background color | background-color | background+color (when height is < 2px, the display height is gray projection, color is required to set the color, the same as text) | background-color |
For example, if you want to create a dividing line with the actual height of 3px, the four sides are 1px, the border color is #07f, and the other part is #f60, you know:
Copy the code