當(dāng)前位置:
首頁 >
IE8 CSS HACK 兼容集合
發(fā)布時(shí)間:2025/4/14
39
豆豆
生活随笔
收集整理的這篇文章主要介紹了
IE8 CSS HACK 兼容集合
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
"\9" 例:"margin:0px auto\9;".這里的"\9"可以區(qū)別所有IE和FireFox.??
"*" IE6、IE7可以識別.IE8、FireFox不能.??
"_" IE6可以識別"_",IE7、IE8、FireFox不能.
?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <FCK:meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>區(qū)別IE6、IE7、IE8、FireFox的CSS hack</title> <style type="text/css"> <!-- #test,#note{margin:0 auto;text-align:center; } #test {width:200px;height:30px;border: 1px solid #000000;color:#fff;line-height:30px; } .color{background-color: #CC00FF; /*所有瀏覽器都會顯示為紫色*/background-color: #FF0000\9; /*IE6、IE7、IE8會顯示紅色*/*background-color: #0066FF; /*IE6、IE7會變?yōu)樗{(lán)色*/ _background-color: #009933; /*IE6會變?yōu)榫G色*/ } --> </style> </head> <body> <div id="test" class="color">測試方塊</div> <div id="note"> <strong style="color:#009933">IE6</strong> <strong style="color:#0066FF">IE7</strong> <strong style="color:#FF0000">IE8</strong> <strong style="color:#CC00FF">FireFox</strong> </div> </body> </html>轉(zhuǎn)載于:https://www.cnblogs.com/mrcoke/articles/2505973.html
總結(jié)
以上是生活随笔為你收集整理的IE8 CSS HACK 兼容集合的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 学习jquery选项卡插件
- 下一篇: css小经验: 转载 - CSS文本溢出