栏目导航
热点推荐
- 3个简单却重要的CSS技巧
- css基础:熟悉了解盒子模型(box m
- CSS Hack兼容各浏览器是否正常
- 最常用的12种CSS BUG解决方法与
- [分享]我的css hack观点
- CSS实例教程:分号引起页面混乱
- CSS教程:认真学习haslayout
- CSS教程:编写CSS代码时样式命名
- 如何在CSS中设定文本的尺寸
- CSS教程:CSS定位属性
- 新窗口打开超链接的正确方法
- 轻松搞定IE的CSS制作网页技巧3则
阅览排行
css浮动边距加倍错误(双倍边距BUG)的解决办法
www.jz123.cn 2010-12-01 来源: 站长家园 责任编辑(袁袁) 我要投递新闻
如果某条边与浮动方向同向,则向该边上的浮动框应用边距时,边距会增加一倍。此错误只影响一次或多次浮动的某行中的第一次浮动。
影响: Internet Explorer 6.0
该错误只影响ie而不影响其他浏览器,我们可以考虑用hack来解决!!!
_display:inline;
加入上面这句问题解决
adobe官方解决方法:
Problem
When a margin is applied to a floated box on the same side as the direction the box is floated AND the floated box is the first one inside its containing box, the margin is doubled. (In other words, a left-floated box with margin-left set to move it away from its containing box will be twice as far away from the left edge of the containing box as intended.)
Solution
Specify display: inline; for the affected float.
Detailed description
This bug only reproduces when the floated element''s margin extends in the same direction as the float itself, and is between the float and the container box''s inside edge. Subsequent floats with similar margins won''t reproduce this bug- just the first float in any row of floated elements.
上一篇:CSS Hack 汇总应用快查 下一篇:用css hack针对IE的优化