Home  >  Article  >  Web Front-end  >  DIV和CSS排版中制作细线条的几种方法(转)_html/css_WEB-ITnose

DIV和CSS排版中制作细线条的几种方法(转)_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:28:09963browse

今天制作div的高度控制的时候发现IE下控制div的高度很小的时候无效,特意查了一下相关文章。

最终有了解决方案,参考下面文章:

如果要制作一条高度小于12PX(大约)的线条,在IE中会显示出高于实际高度的,看下面。



可看出实际高度大于6PX,这也算是IE的一个BUG吧。以下三种方法可解决这个问题,推荐使用第一种方法。
1:



2. div之间要加个空格 注:IE5.0 无效



3:



备注:在FireFox下一点问题也没有,IE的Bug。
    overflow: hidden;
    font-size:1px;
Statement:
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