史上最全的浏览器-CSS.docx

上传人:人*** 文档编号:560206416 上传时间:2022-10-31 格式:DOCX 页数:8 大小:143.70KB
返回 下载 相关 举报
史上最全的浏览器-CSS.docx_第1页
第1页 / 共8页
史上最全的浏览器-CSS.docx_第2页
第2页 / 共8页
史上最全的浏览器-CSS.docx_第3页
第3页 / 共8页
史上最全的浏览器-CSS.docx_第4页
第4页 / 共8页
史上最全的浏览器-CSS.docx_第5页
第5页 / 共8页
点击查看更多>>
资源描述

《史上最全的浏览器-CSS.docx》由会员分享,可在线阅读,更多相关《史上最全的浏览器-CSS.docx(8页珍藏版)》请在金锄头文库上搜索。

1、-精品word文档 值得下载 值得拥有-浏览器渲染页面的方式各不相同,甚至同一浏览器的不同版本(“杰出代表”是 IE)也有差异。因此,浏览器兼容成为前端开发人员的必备技能。如果有一份浏览器 Hack 手册,那查询起来就方便多了。这篇文章就向大家分享Browserhacks 帮我们从网络上收集的各个浏览器特定的 CSS & JavaScript Hack,记得推荐和分享啊!IE 选择器 Hack?123/* IE 6 and below */* html .selector .suckyie6.selector /* .suckyie6 can be any unused class */?12

2、/* IE 7 and below */.selector, ?1234/* IE 7 */*:first-child+html .selector .selector, x:-IE7 *+html .selector ?/* Everything but IE 6 */html body .selector ?123/* Everything but IE 6/7 */html /*/ body .selector head /* */ body .selector ?12345/* Everything but IE 6/7/8 */:root * .selector body:last-

3、child .selector body:nth-of-type(1) .selector body:first-of-type .selector IE 属性/值 Hack?123/* IE 6 */.selector _color: blue; .selector -color: blue; ?123/* IE 6/7 - acts as an !important */.selector color: blue !ie; /* string after ! can be anything */?1234567/* IE 6/7 - any combination of these cha

4、racters: ! $ & * ( ) = % + , . / # ? : | */.selector !color: blue; .selector $color: blue; .selector &color: blue; .selector *color: blue; /* . */?123/* IE 8/9 */.selector color: blue0/; /* must go at the END of all rules */?12/* IE 9/10 */.selector:nth-of-type(1n) color: blue9; ?123/* IE 6/7/8/9/10

5、 */.selector color: blue9; .selector color/*/: blue9; ?12/* Everything but IE 6 */.selector color/*/: blue; IE Media Query Hack?12/* IE 6/7 */media screen9 ?12/* IE 8 */media 0screen ?12/* IE 9/10, Firefox 3.5+, Opera */media screen and (min-resolution: +72dpi) ?12/* IE 10+ */media screen and (-ms-h

6、igh-contrast: active), (-ms-high-contrast: none) ?12/* IE 6/7/8 */media 0screen,screen9 ?12/* IE 8/9/10 & Opera */media screen0 ?12/* IE 9/10 */media screen and (min-width:00) ?12/* Everything but IE 6/7/8 */media screen and (min-width: 400px) IE JavaScript Hack?123/* IE 6 */(checkIE = document.crea

7、teElement(b).innerHTML = ; var isIE = checkIE.getElementsByTagName(i).length = 1;?1234/* IE 7 */(checkIE = document.createElement(b).innerHTML = ; var isIE = checkIE.getElementsByTagName(i).length = 1; navigator.appVersion.indexOf(MSIE 7.)!=-1?12/* IE = 8 */var isIE = v=v;?123/* IE 8 */(checkIE = do

8、cument.createElement(b).innerHTML = ; var isIE = checkIE.getElementsByTagName(i).length = 1;?123/* IE 9 */(checkIE = document.createElement(b).innerHTML = ; var isIE = checkIE.getElementsByTagName(i).length = 1;?12/* IE 10 */var isIE = eval(/*cc_on!*/false) & document.documentMode = 10;?12/* IE 10 *

9、/var isIE = document.body.style.msTouchAction != undefined;Firefox 浏览器选择器 Hack?12/* Firefox 1.5 */body:empty .selector ?12/* Firefox 2+ */.selector, x:-moz-any-link ?12/* Firefox 3+ */.selector, x:-moz-any-link; x:default ?12/* Firefox 3.5+ */body:not(:-moz-handler-blocked) .selector 媒体查询 Hack?12/*

10、Firefox 3.5+, IE 9/10, Opera */media screen and (min-resolution: +72dpi) ?12/* Firefox 3.6+ */media screen and (-moz-images-in-menus:0) ?12/* Firefox 4+ */media screen and (min-moz-device-pixel-ratio:0) JavaScript Hack?12/* Firefox */var isFF = !navigator.userAgent.match(/firefox/i);?12/* Firefox 2

11、- 13 */var isFF = Boolean(window.globalStorage);?12/* Firefox 2/3 */var isFF = /a/-1=a;?12/* Firefox 3 */var isFF = (function x()-5=x;Chrome 浏览器选择器 Hack?12/* Chrome 24- and Safari 5- */:made-up-pseudo-element, .selector 媒体查询 Hack?12/* Chrome, Safari 3+ */media screen and (-webkit-min-device-pixel-ra

12、tio:0) JavaScript Hack?12/* Chrome */var isChrome = Boolean(window.chrome);Safari 浏览器选择器 Hack?123/* Safari 2/3 */htmlxmlns*= body:last-child .selector htmlxmlns*=:root .selector ?12/* Safari 2/3.1, Opera 9.25 */*|htmlxmlns*= .selector ?12/* Safari 5- and Chrome 24- */:made-up-pseudo-element, .selector 媒体查询 Hack?12/* Safari 3+, Chrome */media screen and (-webkit-min-device-pixel-ratio:0) JavaScript Hack?12/* Safari */var isSafari = /a/._p

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 中学教育 > 其它中学文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号