[CSS HACK]IE6¡¢IE7¡¢IE8¡¢Firefox¼æÈÝÐÔÎÊÌâ
1.Çø±ðIEºÍ·ÇIEä¯ÀÀÆ÷
#tip {
background:blue; /*·ÇIE ±³¾°藍É«*/
background:red \9; /*IE6¡¢IE7¡¢IE8±³¾°紅É«*/
}
2.Çø±ðIE6,IE7,IE8,FF
¡¾Çø±ð·ûºÅ¡¿£º¡¸\9¡¹¡¢¡¸*¡¹¡¢¡¸_¡¹
¡¾Ê¾Àý¡¿£º
#tip {
background:blue; /*Firefox ±³¾°±äÀ¶É«*/
background:red \9; /*IE8 ±³¾°±äºìÉ«*/
*background:black; /*IE7 ±³¾°±äºÚÉ«*/
_background:orange; /*IE6 ±³¾°±äéÙÉ«*/
}
¡¾ËµÃ÷¡¿£ºÒòΪIEϵÁÐä¯ÀÀÆ÷¿É¶Á¡¸\9¡¹£¬¶øIE6ºÍIE7¿É¶Á¡¸*¡¹(Ã××ÖºÅ)£¬ÁíÍâIE6¿É±æʶ¡¸_¡¹(µ×Ïß)£¬Òò´Ë¿ÉÒÔÒÀÕÕ˳ÐòдÏÂÀ´£¬¾Í»áÈÃä¯ÀÀÆ÷ÕýÈ·µÄ¶ÁÈ¡µ½×Ô¼º¿´µÃ¶®µÃCSSÓï·¨£¬ËùÒԾͿÉÒÔÓÐЧÇø·ÖIE¸÷°æ±¾ºÍ·ÇIEä¯ÀÀÆ÷(ÏñÊÇFirefox¡¢Opera¡¢Google Chrome¡¢SafariµÈ)¡£
3.Çø±ðIE6¡¢IE7¡¢Firefox (·½·¨ 1)
¡¾Çø±ð·ûºÅ¡¿£º¡¸*¡¹¡¢¡¸_¡¹
¡¾Ê¾Àý¡¿£º
#tip {
background:blue; /*Firefox±³¾°±äÀ¶É«*/
*background:black; /*IE7 ±³¾°±äºÚÉ«*/
_background:orange; /*IE6 ±³¾°±äéÙÉ«*/
}
¡¾ËµÃ÷¡¿£ºIE7ºÍIE6¿É¶Á¡¸*¡¹(Ã××ÖºÅ)£¬IE6ÓÖ¿ÉÒÔ¶Á¡¸_¡¹(µ×Ïß)£¬µ«ÊÇIE7È´ÎÞ·¨¶ÁÈ¡¡¸_¡¹£¬ÖÁÓÚFirefox(·ÇIEä¯ÀÀÆ÷)ÔòÍêÈ«ÎÞ·¨±æʶ¡¸*¡¹ºÍ¡¸_¡¹£¬Òò´Ë¾Í¿ÉÒÔ͸¹ýÕâÑùµÄ²îÒìÐÔÀ´Çø·ÖIE6¡¢IE7¡¢Firefox
4.Çø±ðIE6¡¢IE7¡¢Firefox (·½·¨ 2)
¡¾Çø±ð·ûºÅ¡¿£º¡¸*¡¹¡¢¡¸!important¡¹
¡¾Ê¾Àý¡¿£º
#tip {
background:blue; /*Firefox ±³¾°±äÀ¶É«*/
*background:green !important; /*IE7 ±³¾°±äÂÌÉ«*/
*background:orange; /*IE6 ±³¾°±äéÙÉ«*/
}
¡¾ËµÃ÷¡¿£ºIE7¿ÉÒÔ±æʶ¡¸*¡¹ºÍ¡¸!important¡¹£¬µ«ÊÇIE6Ö»¿ÉÒÔ±æʶ¡¸*¡¹£¬È´ÎÞ·¨±æʶ¡¸!important¡¹£¬ÖÁÓÚFirefox¿ÉÒÔ¶ÁÈ¡¡¸!important¡¹µ«²»Äܱæʶ¡¸*¡¹Òò´Ë¿ÉÒÔ͸¹ýÕâÑùµÄ²îÒìÀ´ÓÐЧÇø¸ôIE6¡¢IE7¡¢Firefox¡£
5.Çø±ðIE7¡¢Firefox
¡¾Çø±ð·ûºÅ¡¿£º¡¸*¡¹¡¢¡¸!important¡¹
¡¾Ê¾Àý¡¿£º
#tip {
background:blue; /*Firefox ±³¾°±äÀ¶É«*/
*background:green !important; /*IE7 ±³¾°±äÂÌÉ«*/
}
¡¾ËµÃ÷¡¿£ºÒòΪFirefox¿ÉÒÔ±æʶ¡¸!important¡¹µ«È´ÎÞ·¨±æʶ¡¸*¡¹£¬¶øIE7Ôò¿ÉÒÔͬʱ¿´¶®¡¸*¡¹¡¢¡¸!important¡¹£¬Òò´Ë¿ÉÒÔÁ½¸ö±æʶ·ûºÅÀ´Çø¸ôIE7ºÍFirefox¡£
6.Çø±ðIE6¡¢IE7 (·½·¨ 1)
¡¾Çø±ð·ûºÅ¡¿£º¡¸*¡¹¡¢¡¸_¡¹
¡¾Ê¾Àý¡¿£º
#tip
Ïà¹ØÎĵµ£º
ÎÒ×î½üÔÚÄ£·Â²©¿ÍÔ°£¬ÖÆ×÷Ò»¸ö¸öÈ˲©¿Í£¬Í»È»·¢ÏÖFooter²¿·Ö¸¡¶¯µ½ÁËContent²¿·Ö£¬ÎÒÔÚFooter²¿·ÖÒѾ¼ÓÁËÒ»¾ä¡°clear:both;¡±£¬ÎªÊ²Ã´»¹»á³öÏÖÕâ¸öÎÊÌâ¡£Footer²¿·ÖµÄCSS´úÂëÈçÏ£º /*Ò³Ãæµ×²¿*/
#Footer {width:100%;height:70px;margin:0 auto;clear:both;} /*Èç¹û¼ÓÁËclear:both; ´Ë²¿·Ö¾Í²»»á¸¡¶¯ÁË*/ ......
ÍøÕ¾±äºÚ»ÒÉ«CSSÂ˾µ´úÂë
Òý×Ô:http://edu.seuuo.com/html/81/n-12181.html
Ϊ·½±ãÕ¾µã°§µ¿£¬ÌØÌṩcssÂ˾µ´úÂ룬ÒÔ±í°§µ¿¡£ÒÔÏÂΪȫվCSS´úÂë¡£
html { filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); }
ʹÓ÷½·¨£ºÕâ¶Î´úÂë¿ÉÒÔ±äÍøҳΪºÚ°×£¬½«´úÂë¼Óµ½CSS×¶Ë¾Í¿ÉÒÔʵÏÖËØ×°¡£½¨ÒéÈ«¹úÕ¾³¤¶¯ ......
¿´¿´ÏÂÃæÕâ¶Î´úÂ룬ÊÇ·ñ±¶¸ÐÇ×Çе«ÓÖ¾õµÃºÜÄ°ÉúÄØ£º
.test {
background-color: black; /* firefox, opera, ie8 */
[;background-color: green;] /* safari, chrome */
*background-color: blue; /* ie7 */
_background-color: red; /* ie6 */
}
html*~/**/body .test {
border: 5px solid ......
Åöµ½ºÃЩÎÊÌ⣬FirefoxÏÂÃæ¿´×źÜÍêÃÀ£¬ie6ÏÂÃæ¾Í²Ò²»È̶㬻¹ºÃ£¬Ò»µãµãÂýÂý½â¾öÁË¡£Ò»Ð©¶«Î÷ժ¼һÏ£¬ÒÔºóÒ²ÐíÓõõ½¡£
DIV+CSS½â¾öIE6£¬IE7£¬IE8£¬FF¼æÈÝÎÊÌâ
ÄÇÎÒÀ´ËµËµ°É£¬×öÁ˼¸ÄêµÄDIV+CSS£¬Ò²»ýÀÛÁ˲»ÉÙ½â¾ö¼æÈÝÎÊÌâµÄ·½·¨£¬ÎÒÕâÀïֻ˵ÏÖÔÚÖ÷Á÷µÄ¼¸¸ö£¬£¨IE6£¬IE7£¬IE8£¬FF£©ÆäËüµÄûȥÑо¿¹ý
1.ie8ϼæÈÝÎÊÌ⣠......