min-height对ie6, 7, 8及ff的兼容
来源:互联网 发布:一根糯玉米的热量知乎 编辑:程序博客网 时间:2024/05/20 18:49
min-height对ie6, 7, 8及ff的兼容
#element { min-height:100px; height:auto!important; height:100px;}
ie6不支持min-height, 实际上只要对ie6设置height:100px,便能实现min-height:100px的效果。
但height:auto!important和height:100px调换顺序,则ie6失去min-height效果,变为auto。
若只有min-height:100px和height:auto!important,则不论顺序如何,除ie6为auto的效果,其他均为min-height效果。
若只有min-height:100px和height:100px,则不论顺序如何,除ie6有min-height的效果,其他均为height:100px。
所以,对ie7,8,ff来说,优先级顺序为height:固定值>min-height>height:auto
--------------------------------------------------
有网友测试,认为写在同一选择器中的!important不被IE6支持,而分开则支持
比如:
#element { background:green!important; }
#element { background:red;}
则ie6支持!important
而这样:
#element { background:green!important; background:red;}
则ie6不支持!important。
其实对后一种情况,改写成这样#element { background:red; background:green!important; },结果还是green起作用,所以对这种情况,ie6可能忽略了!important这几个字符而已,就像上面height:auto!important和height:100px调换顺序一样。
注:以上测试,ie6,8为ietester模拟。
ie6不支持min-height, 实际上只要对ie6设置height:100px,便能实现min-height:100px的效果。
但height:auto!important和height:100px调换顺序,则ie6失去min-height效果,变为auto。
若只有min-height:100px和height:auto!important,则不论顺序如何,除ie6为auto的效果,其他均为min-height效果。
若只有min-height:100px和height:100px,则不论顺序如何,除ie6有min-height的效果,其他均为height:100px。
所以,对ie7,8,ff来说,优先级顺序为height:固定值>min-height>height:auto
--------------------------------------------------
有网友测试,认为写在同一选择器中的!important不被IE6支持,而分开则支持
比如:
#element { background:green!important; }
#element { background:red;}
则ie6支持!important
而这样:
#element { background:green!important; background:red;}
则ie6不支持!important。
其实对后一种情况,改写成这样#element { background:red; background:green!important; },结果还是green起作用,所以对这种情况,ie6可能忽略了!important这几个字符而已,就像上面height:auto!important和height:100px调换顺序一样。
注:以上测试,ie6,8为ietester模拟。
- min-height对ie6, 7, 8及ff的兼容
- min-height最小高度的实现--兼容IE6、IE7、FF
- min-height最小高度的实现(兼容IE6、IE7、FF)
- min-height最小高度的实现(兼容IE6、IE7、FF)
- min-height最小高度的实现(兼容IE6、IE7、FF、Chrome)
- min-height最小高度的实现(兼容IE6、IE7、FF)
- min-height最小高度的实现(兼容IE6、IE7、FF、Chrome)
- 兼容IE6的min-width、min-height的简单方法
- 【兼容ie6笔记】min-height
- min-height不兼容IE6
- ie6兼容min-width跟min-height
- 用min-height实现最小高度(兼容IE6、IE7、FF)
- min-width、max-width、min-height、max-height在IE6下兼容的解决办法
- Min-height 最小高度兼容ie6
- 关于scrolltop 兼容 IE6/7/8, Safari,FF的方法
- 关于scrolltop 兼容 IE6/7/8, Safari,FF的方法
- IE6支持兼容max-height、min-height、max-width、min-width CSS样式
- ie6中min-height无效的解决办法
- map中key为结构体的用法
- VS2008中所有快捷键
- python django MySQLdb 连接 mysql 5.5 中文乱码问题的解决
- 九度Online Judge_1527: 首尾相连数组的最大子数组和
- hdu 1250
- min-height对ie6, 7, 8及ff的兼容
- SQL Server连接Oracle详细步骤
- MongoDB学习笔记1(入门)
- Hdu 1757 A Simple Math Problem//矩阵乘法
- MongoDB学习笔记2(数据操作)
- C语言中闭包的探究及比较
- Qt设计dialog窗口的最大化和控件随窗体的改变
- Android LayoutTransition动画使用时发生crash原因分析 [Android设计缺陷]
- 常见编码格式