Home > Web Front-end > HTML Tutorial > About the difference of dividing line hr in various browsers_HTML/Xhtml_Webpage Production

About the difference of dividing line hr in various browsers_HTML/Xhtml_Webpage Production

WBOY
Release: 2016-05-16 16:36:49
Original
1635 people have browsed it

When making pages, the dividing line hr is sometimes used, but it is very painful to display under ie6 and ie7. This article will teach you how to write hr that is compatible with various browsers.

Home page Let’s first understand the differences in hr under each browser, as shown in the following table:

For example, if you want to create a page with an actual height of 3px, a border of 1px, and a border color of #07f , the dividing line with the background color #f60:

Copy the code
The code is as follows:

hr{
height:1px;
background-color:#f60;
border:1px solid #000;
*height:3px;/* for ie6 ie7 */
color: #f60;/* for ie6 ie7 */
}
@-moz-document url-prefix(){ hr{height:3px;}} /* for firefox */
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template