关于hr标记在各浏览器中的问题说明_HTML/Xhtml_网页制作

php.cn
Release: 2016-05-16 16:41:16
original
1221 people have browsed it

一般我们很少见HR,但一见可能就定生死。HTML中也一样,我们不常见


,但一见通常就决定了能否拥用完美分割线。这里,就不附图了,直接列表供查阅吧:
  正常浏览器 IE6、7 Firefox
实际高度 height + border-right-width + border-left-width height height
背景色 background-color background+color(当高度 background-color

比如想创建一个实际高度为3px, 四边为1px, 边框颜色为#07f, 其他部分颜色为#f60的分割线,你懂的:

复制代码
代码如下:

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 */

还有其他更省力的解决方法么?
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 [email protected]
Latest issues
Popular Tutorials
More>
Latest downloads
More>
web effects
Website source code
Website materials
Front end template
About us Disclaimer Sitemap
PHP Chinese website:Public welfare online PHP training,Help PHP learners grow quickly!