Difference ff, ie7.0, ie6.0 different browsers, CSS hack writing

Source: Internet
Author: User

1.
* + HTML and * HTML are unique tags of IE, which are not supported by Firefox at the moment, while * + HTML is unique to IE7. Therefore, you can easily obtain
The hack instance code for Firefox, IE6, and IE7 browsers is as follows:

<HTML> <br/> <pead> <br/> <MCE: style> <! -- <Br/> # wrapper {width: 120px; Height: 100px; Background: # ff0;}/* Firefox */<br/> * html # wrapper {width: 80px;}/* IE6 fixed */<br/> * + html # wrapper {width: 60px;}/* IE7 fixed, note the sequence */<br/> --> </MCE: style> <style mce_bogus = "1"> # wrapper {width: 120px; Height: 100px; Background: # ff0;}/* Firefox */<br/> * html # wrapper {width: 80px ;} /* IE6 fixed */<br/> * + html # wrapper {width: 60px;}/* IE7 fixed, attention sequence */</style> <br/> </pead> <br/> <body> <br/> <Div id = "wrapper"> </div> <br/> </body> <br/> </ptml> <br/>

 

 

2.
IE6 can recognize *, but cannot recognize it! Important and IE7 can recognize * and also! Important; FF cannot recognize *, but can recognize it! Important; therefore, you can write an hack instance code for Firefox, IE7, and IE6 browsers:

<HTML> <br/> <pead> </P> <p> <MCE: style> <! -- <Br/> # wrapper {width: 120px; * width: 60px! Important; * width: 80px; Height: 100px; Background: # ff0 ;}< br/>/* Note that Firefox is written before IE7 is written in the middle, IE6 is written at the end */<br/> --> </MCE: style> <style mce_bogus = "1" ># wrapper {width: 120px; * width: 60px! Important; * width: 80px; Height: 100px; Background: # ff0 ;}< br/>/* Note that Firefox is written before IE7 is written in the middle, IE6 is written at the end */</style> <br/> </pead> <br/> <body> <br/> <Div id = "wrapper"> </ div> <br/> </body> </P> <p> </ptml>

 

 

3.
You can also use ie6.0 to support underscores (_). Therefore, you can also write the following hack instance code for Firefox, IE7, and IE6 browsers:
<HTML> <br/> <pead> </P> <p> <MCE: style> <! -- <Br/> # wrapper {width: 120px; * width: 60px; _ width: 80px; Height: 100px; Background: # ff0 ;} </P> <p>/* Note that Firefox is written first, IE7 is written in the middle, and IE6 is written in the end */<br/> --> </MCE: style> <style mce_bogus = "1"> # wrapper {width: 120px; * width: 60px; _ width: 80px; Height: 100px; Background: # ff0 ;} </P> <p>/* Note that Firefox is written first, and IE7 is written in the middle, IE6 is written at the end */</style> <br/> </pead> <br/> <body> <br/> <Div id = "wrapper"> </ div> <br/> </body> </P> <p> </ptml>

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.