Internet Explorer CSS hacks
²âÊÔ»·¾³£ºIE6 , IE7, IE8, FF3.0
±í´ï·½Ê½£º±í´ï·½Ê½£º
body { `background:red }
body { ~background:red }
body { !background:red }
body { @background:red }
body { #background:red }
body { $background:red }
body { %background:red }
body { ^background:red }
body { &background:red }
body { *background:red }
body { (background:red }
body { )background:red }
body { =background:red }
body { +background:red }
body { [background:red }
body { ]background:red }
body { {background:red }
body { |background:red }
body { ,background:red }
body { <background:red }
body { .background:red }
body { >background:red }
body { /background:red }
body { ?background:red }
½áÂÛ£ºIEʶ±ðËùÓÐCSS Hack ½áÂÛ£ºIEʶ±ðËùÓÐCSS Hack
±ÈÈçÎÒÃÇҪʵÏÖÔÚIE ÖÐ480px µÄ¿í¶È£¬¶øÔÚÆäËûä¯ÀÀÆ÷500px µÄ¿í¶È£¬¾Í¿ÉÒÔͨ¹ýHack À´Íê³É£¬ÈçÏ£º±ÈÈçÎÒÃÇҪʵÏÖÔÚIEÖÐ480pxµÄ¿í¶È£¬¶øÔÚÆäËûä¯ÀÀÆ÷500pxµÄ¿í¶È£¬¾Í¿ÉÒÔͨ¹ýHackÀ´Íê³É£¬ÈçÏ£º
#hack {
width : 500px;
+width : 480px; /*only IE*/
}
Ïà¹ØÎĵµ£º
ÎÒÃÇ¿ÉÒÔͨ¹ýCSSÊôÐÔfloatÁîÔªËØÏò×ó»òÏòÓÒ¸¡¶¯¡£Ò²¾ÍÊÇ˵£¬ÁîºÐ×Ó¼°ÆäÖеÄÄÚÈݸ¡¶¯µ½Îĵµ£¨»òÕßÊÇÉϲãºÐ×Ó£©µÄÓұ߻òÕß×ó±ß£¨²Î¼ûµÚ9¿Î¹ØÓÚºÐ×´Ä£Ð͵ÄÃèÊö£©¡£ÏÂͼ²ûÃ÷ÁËÆäÔÀí£º
¾Ù¸öÀý×Ó£¬¼ÙÈçÎÒÃÇÏëÈÃÒ»ÕÅͼƬ±»Ò»¶ÎÎÄ×ÖÎ§ÈÆ×Å£¬ÄÇôÆäÏÔʾЧ¹û½«ÈçÏÂËùʾ£º
ÈçºÎʵÏÖÕâ¸öЧ¹û£¿
ÉÏÀýµÄHTML´úÂëÈçÏÂËùʾ£º
<div i ......
CSS ExpressionÓ÷¨×ܽá
ת×Ôhttp://www.chencheng.org/demo/css-expression.php
CSS Expression£¬¶¯Ì¬ CSS ÊôÐÔ£¬IE ˽ÓУ¬×Ô 5.0 ¿ªÊ¼ÒýÈ루IE8 ½«²»ÔÙÖ§³Ö£©£¬²Î¿¼ MSDN£¬²»¹ýÓÐʱÓÃjavascript¶¯Ì¬Éú³ÉËü×÷ΪIE6µÄhack»¹ÊDz»´íµÄ£¡
Õâ¶«Î÷µÄÓŵ㣺
ʹ CSS ÊôÐÔ¶¯Ì¬Éú³É£¬ËùÒÔ»ù±¾ js ÄܸɵÄËü¶¼ÄܸÉ
ʹÓà CSS Ñ¡Ôñ ......
cssÂúÆÁ²¼¾ÖÓëulºÍliÁбí <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta content="text/html; charset=u ......
cursorÖÐhandÓëpointer
Àý×Ó£ºCSSÊó±êÊÖÐÍЧ¹û <a href="#" style="cursor:hand">CSSÊó±êÊÖÐÍЧ¹û</a>
pointerÒ²ÊÇÊÖÐÍ£¬ÕâÀïÍÆ¼öʹÓÃÕâÖÖ£¬ÒòΪÕâ¿ÉÒÔÔÚ¶àÖÖä¯ÀÀÆ÷ÏÂʹÓá£
Àý×Ó£ºCSSÊó±êÊÖÐÍЧ¹û <a href="#" style="cursor:pointer">CSSÊó±êÊÖÐÍЧ¹û</a>
crosshairÊÇÊ®×ÖÐÍ
Àý×Ó£ºCSSÊó± ......