Using CSS Hack to differentiate FF/IE7/IE6/IE5.5/IE5 code recommendation _ Experience Exchange
Source: Internet
Author: User
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <ptml xmlns=" http://www.w3.org/1999/xhtml "> <pead> <meta http-equiv=" Content-type "content=" text/html; charset=gb2312 "/> <title> fx/ie7/ie6/ie5.5/ie5</title> <style type=" Text/css "> < by CSS Hack !--#fx {display:none; BORDER:3PX double #999; width:300px; height:200px; padding:10px; } #ie6 {Display:none!important; display:none;/*ie5*/font-size:54px; border:10px solid #CCC; padding:100px; } #ie6/**/{Display:block; Display/*ie5.5*/:none; } #ie7 {Display:block!important; DISPLAY:NONE;/*IE5 & ie6*/Background-color: #69f; border:1px dashed #63c; padding:50px; width:200px; height:150px; } *:lang (zh) #ie7 {display:none!important;} *:lang (zh) #fx {display:block!important;}--#example {color:red;} * HTML #example {color:blue;} *+html #example {color:green;} </style> </pead> <Body lang= "zh" > This is the effect under IE 6 below the effect which is under IE 7 below for simple distinction Ff/ie6/ie7 example this line of text under FF should be red, under IE6 should be blue, in I The E7 should be green. </body> </ptml>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service