IE6ÏÂCSS±³¾°Í¼Æ¬ÓÐÉÁ¶¯BUG½â¾ö ͼƬ»º´æ
IE6ÏÂÁ´½ÓαÀࣨ:hover£©CSS±³¾°Í¼Æ¬ÓÐÉÁ¶¯BUG£¬Ö÷ÒªÔÒòie»áÔÙÒ»´ÎÇëÇóÕâÕÅͼƬ£¬»òÕß˵ͼƬû±»»º´æ¡£
ÀýÈ磺
CSS´úÂë
a:hover{background:url(imagepath)}
³£ÓõĽâ¾ö·½°¸£º
ÔÚÒ³Ãæµ×²¿Ìí¼ÓÒÔÏÂIE6רÓôúÂ룬ÈÃIE6»º´æCSS±³¾°Í¼Æ¬ÖÁ±¾µØ£¬ÕâÑùa:hoverʱIE6¾Í²»»áÔÙÖØÐÂÏò·þÎñÆ÷ÇëÇó¼ÓÔر³¾°Í¼Æ¬ÁË¡£
XML/HTML´úÂë
<!–[if IE 6]>
<script type=”text/javascript”>
document.execCommand(”BackgroundImageCache”, false, true);
</script>
<![endif]–>
»òÕß
XML/HTML´úÂë
<!–[if IE 6]>
<script type=text/javascript>
try {
document.execCommand(”BackgroundImageCache”, false, true);
} catch(err) {}
</script>
<![endif]–>
Ïà¹ØÎĵµ£º
CSS hackÊÇÖ¸ÎÒÃÇΪÁ˼æÈݸ÷ä¯ÀÀÆ÷£¬¶øʹÓõÄÌرðµÄcss¶¨Òå¼¼ÇÉ¡£ÕâÊǹúÍâÕªÀ´µÄÒ»ÕÅCSS hackÁÐ±í£¬ÏÔʾÁ˸÷ä¯ÀÀÆ÷¶Ôcss hackµÄÖ§³Ö³Ì¶È£¬¶ÔÎÒÃÇÖÆ×÷¼æÈÝÍøÒ³·Ç³£ÓаïÖú¡£
ÆÁ±ÎIEä¯ÀÀÆ÷£¨Ò²¾ÍÊÇIEϲ»ÏÔʾ£© *:lang(zh) select {font:12px !important;} /*FF,OP¿É¼û£¬ÌرðÌáÐÑ£ºÓÉÓÚOpera×î½üµÄÉý¼¶£¬Ä¿Ç°´Ë¾äֻΪFF ......
ºÐÄ£ÐÍ£¬ÊÇXHTML
+CSS
²¼¾Ö
Ò³ÃæÖеÄ
ºËÐÄ£¡ÊǹØϵµ½Éè¼ÆÖÐÅŰ涨λµÄ¹Ø¼ü£¬¶¼×ñѺÐÄ£Ð͹淶£¬ÀýÈç<div>¡¢<p>¡¢<a>……ºÐÄ£ÐÍ°üº¬
(Íâ
±ß¾à)margin£¬(Äڱ߾à)padding £¬(ÄÚÈÝ)content£¬(±ß¿ò)border¡£
ÏÂͼÊÇCSSºÐÄ£Ð͵ÄʾÒâͼ
ÕâЩÊôÐÔÎÒÃÇ¿ÉÒÔ°ÑËüתÒƵ½ÎÒÃÇÈÕ³£Éú» ......
<html>
<head>
<mce:style type="text/css"><!--
div.container
{
width:100%;
margin:0px;
border:1px solid gray;
line-height:150%;
}
div.header,div.footer
{
padding:0.5em;
color:white;
background-color:gray;
clear:left;
}
h1.header
{
padding:0;
margin:0;
}
div. ......
¡¡CSSѧÆðÀ´²¢²»ÄÑ£¬µ«ÔÚ´óÐÍÏîÄ¿ÖУ¬¾Í±äµÃÄÑÒÔ¹ÜÀí£¬ÌرðÊDz»Í¬µÄÈËÔÚCSSÊéд·ç¸ñÉÏÉÔÓв»Í¬£¬ÍŶÓÉϾ͸ü¼ÓÄÑÒÔ¹µÍ¨£¬Îª´Ë×ܽá
ÁËһЩÈçºÎʵÏÖ¸ßЧÕû½àµÄCSS´úÂëÔÔò£º
1
. ʹÓÃResetµ«²¢·ÇÈ«¾ÖReset
¡¡¡¡²»Í¬ä¯ÀÀÆ÷ÔªËصÄĬÈÏÊôÐÔÓÐËù²»Í¬£¬Ê¹ÓÃReset¿ÉÖØÖÃä¯ÀÀÆ÷ÔªËصÄһЩĬÈÏÊôÐÔ£¬ÒÔ´ïµ½ä¯ÀÀÆ÷µÄ¼æÈÝ¡£µ«ÐèÒª×¢Ò ......
²»Í¬µÄä¯ÀÀÆ÷ÒªÇó²»Í¬µÄÑùʽÉùÃ÷£¬¸÷ä¯ÀÀÆ÷¼°Æä¸÷°æ±¾Óв»Í¬³Ì¶ÈµÄ CSS Ö´ÐеÄÍêÕûÐÔ¡£²ÉÓõÄÊÇ Internet Explorer µÄÌõ¼þ×¢ÊÍÓï·¨µÄ˼Ï룬²¢°ÑËüÄÚÁªµ½ CSS ÉùÃ÷Ö®ÖС£
¡¡¡¡Ìõ¼þ CSS Ö÷ÒªÓÃÓÚÖ¸³öÒ»¸öÌرðµÄ CSS ÉùÃ÷ÊDz»ÊÇÓ¦¸ÃÓÃÓÚÒ»¸öÌرðµÄä¯ÀÀÆ÷¡£µ±È»Ä㲻ϣÍû¾³£Õâô×ö£¬µ«Êǵ±ÄãÐèÒªÕë¶ÔÒ»¸öä¯ÀÀÆ÷µÄʱºò£¬Ëü»á·Ç³ ......