CSS hack refers to the different browsers and their versions of CSS after parsing the effect of the difference.
CSS hack main solution browser is IE6, IE7, IE8, Chrome, Firefox, Safari, Opera, other browsers
Do not solve, is generally based on the above kernel, and the use of less proportion.
For IE Browser:
<pre class= "Prettyprint linenums bush:css" lang= "CSS" ><style> p{width:400px; height:400px; background-color:red; background-color:blue\9; /* all ie*/background-color:yellow\0; /*IE8 hack*/_background-color: #CDCDCD; /* IE 6*/*+html background-color:white; /* only ie7*/*background-color:pink; /*ie6 IE7 hack*/@background-color:white; /*opera hack*/} </style> <p>php-Focus on PHP development, providing professional PHP tutorials <p>
For Firefox:
<pre class= "Prettyprint linenums bush:css" lang= "CSS" >*:lang (lang) selector {property:value!important;}
With pseudo-class Lang (language) plus!important definition, only Firefox can be identified at this time.
For Safari:
<pre class= "Prettyprint linenums bush:css" lang= "css" >selector:empty {property:value!important;}
With pseudo-class empty plus!important defined, only safari can currently identify it.
For Opera:
<pre class= "Prettyprint linenums bush:css" lang= "CSS" > @media all and (min-width:0px) {selector {property:value;} }
With the special inheritance method, only opera can be identified at this time.
Finally, attach a CSS hack form:
<a title= "css.jpg" href= "http://www.php.cn/" >
Css.jpg "/>