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 ExpressionÓ÷¨×ܽá
ת×Ôhttp://www.chencheng.org/demo/css-expression.php
CSS Expression£¬¶¯Ì¬ CSS ÊôÐÔ£¬IE ˽ÓУ¬×Ô 5.0 ¿ªÊ¼ÒýÈ루IE8 ½«²»ÔÙÖ§³Ö£©£¬²Î¿¼ MSDN£¬²»¹ýÓÐʱÓÃjavascript¶¯Ì¬Éú³ÉËü×÷ΪIE6µÄhack»¹ÊDz»´íµÄ£¡
Õâ¶«Î÷µÄÓŵ㣺
ʹ CSS ÊôÐÔ¶¯Ì¬Éú³É£¬ËùÒÔ»ù±¾ js ÄܸɵÄËü¶¼ÄܸÉ
ʹÓà CSS Ñ¡Ôñ ......
½ñÌì¸Õ۵ģ¬ºÇºÇ
index.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!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 http-equiv="Content-T ......
ºÜ¶àʱºòÍøÒ³Éè¼ÆÖлáÓöµ½¾ÓÖд¦ÀíÎÊÌ⣬°üÀ¨ºáÏòˮƽ¾ÓÖкʹ¹Ö±ÊúÖ±¾ÓÖÐÎÊÌ⣬¶ÔÓÚǰÕßÒ»°ãµÄ·½·¨¿ÉÒÔ²ÉÓÓtext-align:center”ºÍ“margin:0 auto”½øÐÐÓÐЧ¿ØÖÆ£¬Ïà¶Ô±È½Ï¼òµ¥Ò»Ð©£»¶ø´¹Ö±Ë®Æ½¾ÓÖеÄÎÊÌâ¾ÍÏԵò»ÊÇÄÇôÈÝÒס£
ÏÂÃæ±¾Õ¾¾Í´ËÎÊÌâ̸һµãCSS¶ÔÎı¾½øÐд¹Ö±ÊúÖ±¾ÓÖпØÖƵļ¼ÇÉ¡£
µ¥ÐÐÎ ......
cursorÖÐhandÓëpointer
Àý×Ó£ºCSSÊó±êÊÖÐÍЧ¹û <a href="#" style="cursor:hand">CSSÊó±êÊÖÐÍЧ¹û</a>
pointerÒ²ÊÇÊÖÐÍ£¬ÕâÀïÍÆ¼öʹÓÃÕâÖÖ£¬ÒòΪÕâ¿ÉÒÔÔÚ¶àÖÖä¯ÀÀÆ÷ÏÂʹÓá£
Àý×Ó£ºCSSÊó±êÊÖÐÍЧ¹û <a href="#" style="cursor:pointer">CSSÊó±êÊÖÐÍЧ¹û</a>
crosshairÊÇÊ®×ÖÐÍ
Àý×Ó£ºCSSÊó± ......