css hack (ie6-ie9+)
IE6 css hack:
1. *html Selector {} /* Selector 表示 css选择器 下同 */
2. Selector { _property: value; } /* property: value 表示 css 的属性名: 属性值 下同 */
3. Selector { _property/**/: /**/value; }
4. Selector { -property: value; } /*IE6 css hack常用习惯推荐使用下划线_ */
IE7 css hack:
1. *+html Selector {}
2. *:first-child+html Selector {}
IE8 css hack:
Selector { /* 注意看value值的 */
property: value1; /* W3C MODEL */
property: value2\0; /* IE 8+ */
property: value1\9\0; /* IE 9+ */
}
IE6、IE7、IE8共有的css hack:
Selector { property: value\9; }
IE6、IE7共有的css hack:
1. Selector { *property: value; }
2. Selector { #property: value; }
3. Selector { +property: value; }
IE8+ css hack:
Selector { property: value\0; }
IE9+ css hack:
Selector { property: value\9\0; }
单独区分IE8 和IE9
.Selector{margin-left:-2px\0}【ie8和ie9均可识别\0】
:root .Selector{margin-left:0\9}【只有ie9可识别:root】
判断方式:
<!–[if !IE]><!–> 除IE外都可识别 <!–<![endif]–>
<!–[if IE]> 所有的IE可识别 <![endif]–>
<!–[if IE 6]> 仅IE6可识别 <![endif]–>
<!–[if lt IE 6]> IE6以及IE6以下版本可识别 <![endif]–>
<!–[if gte IE 6]> IE6以及IE6以上版本可识别 <![endif]–>
<!–[if IE 7]> 仅IE7可识别 <![endif]–>
<!–[if lt IE 7]> IE7以及IE7以下版本可识别 <![endif]–>
<!–[if gte IE 7]> IE7以及IE7以上版本可识别 <![endif]–>
<!–[if IE 8]> 仅IE8可识别 <![endif]–>
<!–[if IE 9]> 仅IE9可识别 <![endif]–>
css hack (ie6-ie9+)的更多相关文章
- CSS技巧(二):CSS hack
什么是CSS hack CSS hack由于不同的浏览器,比如IE6,IE7,Firefox等,对CSS的解析认识不一样,因此会导致生成的页面效果不一样,得不到我们所需要的页面效果. 这个时候我们就需 ...
- CSS Hack技术详解,支持IE 6-11、Chrome、FireFox、Safari、Opera 6-11、Chrome、FireFox、Safari、Opera6-11、Chrome、FireFox、Safari、Opera6-11、Chrome、FireFox、Safari、Opera
转自: http://www.365mini.com/page/css-hack-ie-chrome-firefox-safari-opera.htm 当前网络时代,各种各样的网页向我们展示着丰富多彩 ...
- 常用CSS HACK
常用CSS HACK IE6 3像素bug和双边距bug一样的经典 现象: IE6下浮动元素和不浮动元素之间会有3px间隙(3px bug,div.float-left + div.float-non ...
- 最新区分兼容IE6/IE7/IE8/IE9/FF的CSS HACK写法和Css if hack条件语法操作说明
自从安装了IE8.0正式版本!木头 就对基本的几个 CSS HACK的做一下归纳!希望对网页前端布局DIV+CSS的实施者有所帮助! 本文就主要以:IE6+IE7+IE8+IE9+FF为主要研究对象 ...
- 区分兼容IE6/IE7/IE8/IE9/FF的CSS HACK写法
HACK原理:不同浏览器对各中字符的识别不同 在 CSS中常用特殊字符识别表: (1)*: IE6+IE7都能识别*,而标准浏览器FF+IE8是不能识别*的; (2)!important: 除IE6 ...
- Css Hack 大全(IE6、IE7、IE8、IE9 css hack)
一.IE6 css hack: 1. *html Selector {} /* Selector 表示 css选择器 下同 */ 2. Selector { _property: value; } / ...
- 怎么用css hack处理各浏览器兼容IE6,IE7,IE8,IE9/ FF
第一:什么事浏览器兼容性 浏览器兼容性问题又被称为网页兼容性或网站兼容性问题,指网页在各种浏览器上的显示效果可能不一致而产生浏览器和网页间的兼容问题.在网站的设计和制作中,做好浏览器兼容,才能够让网站 ...
- IE9下css hack写法
ie9一出css hack也该更新,以前一直没关注,今天在内部参考群mxclion分享了IE9的css hack,拿出来也分享一下: select { background-color:red\0; ...
- 什么是Css Hack?ie6,7,8的hack分别是什么?
针对不同的浏览器写不同的CSS code的过程,就是CSS hack. 示例如下: 1 2 3 4 5 6 7 8 9 10 11 12 #test { width:300px; heig ...
- CSS兼容IE6 IE7 IE8 IE9 Firefox的总结
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
随机推荐
- 【图论】bnuoj 52810 Splitting the Empire
acm.bnu.edu.cn/v3/contest_show.php?cid=9208#problem/G [题意] 给定一个无向图,要求把这个无向图的点划分到不同的集合里,使得每个集合的点之间两两没 ...
- ElasticSearch分词器
什么是分词器? 分词器,是将用户输入的一段文本,分析成符合逻辑的一种工具.到目前为止呢,分词器没有办法做到完全的符合人们的要求.和我们有关的分词器有英文的和中文的.英文的分词器过程:输入文本-关键词切 ...
- Dreamweaver8中文版视频教程 [爱闪教程]Dreamweaver8中文版
原文发布时间为:2008-07-30 -- 来源于本人的百度文章 [由搬家工具导入] http://www.176net.com/shipin/UploadFiles_1476/teach1/%5B% ...
- 【Tomcat】解决Tomcat catalina.out 不断成长导致档案过大的问题
Tomcat的网站上的说法http://wiki.apache.org/tomcat/FAQ/Logging#Q6: System.out 和 System.err 都被打印到 catalina.ou ...
- python3里的Urllib库
首先Urllib是python内置的HTTP请求库. 包括以下模块: urllib.request 请求模块: urllib.error 异常处理模块: urllib.parse url解析模块: u ...
- Python入门---易错已错易混淆----知识点
1.not 1 or 0 and 1 or 3 and 4 or 5 and 6 or 7 and 8 and 9 结果会输出啥? 根据优先级:(not 1) or (0 and 1) or (3 a ...
- 51NOD 1424 零树
Discription 有一棵以1为根的树,他有n个结点,用1到n编号.第i号点有一个值vi. 现在可以对树进行如下操作: 步骤1:在树中选一个连通块,这个连通块必须包含1这个结点. 步骤2:然后对这 ...
- jQuery学习总结(一)——jQuery基础与学习资源
前一段时间录了一套关于jQuery的视频分享给大家,可以在下载区下载到,本来想配合文字一起的,后面发现视频+帮助文档也是非常好的学习方法. 一.jQuery简介与第一个jQuery程序 1.1.jQu ...
- C++ OCX控件开发后出现的注册问题
error MSB3075: 命令“regsvr32 /s /c "F:\JOBS\项目\格网数据的动态三维可视化\Dev\GridDynamicDisplay\gdiplusplot\GD ...
- SQL2000数据库密码被替换,重置密码提示未能找到存储过程sp_password解决方案
利用windows身份验证进入查询分析器后在master数据库下运行如下脚本: create procedure sp_password @old sysname = NULL, -- the old ...