Before arriving at Alibaba, a classmate told me that many people did not die in technical hands, but in HR hands. Generally, we rarely see HR, but it is possible to die and death. The same is true in HTML. But it usually determines whether a perfect split line can be used. Here, we will not see the picture. You can view the list directly:
|
Normal Browser |
IE6, 7 |
Firefox |
Actual height |
Height + border-right-width + border-left-width |
Height |
Height |
Background Color |
Background-color |
Background + color (when the height is less than 2px, the display height is a gray projection, and color is required to set the color, which is the same as the text) |
Background-color |
For example, to create a dividing line with the actual height of 3px, the four sides of 1px, the border color of # 07f, and other colors of # f60, you know:
The Code is as follows:
Hr {
Height: 1px;
* Height: 3px; color: # f60;/* for ie6 ie7 */;
Background-color: # f60;
Border: 1px solid # 07f;
}
@-Moz-document url-prefix () {hr {height: 3px ;}}/* for firefox */
Are there other solutions that are more labor-saving?