˵˵CSS Hack ºÍÏòºó¼æÈÝ
ÈËÒ»µ©Ï°¹ßÁËijЩ¶«Î÷¾ÍºÜÄÑÈ¥¸Ä£¬ÒÔ¼°¸÷ÖÖ¸÷ÑùµÄÔÒò£¬ÐµÄä¯ÀÀÆ÷Ô½À´Ô½¶à£¬¶øÀϵÄ×ÜÌÔ̲»ÁË¡£Ôö³¤×ÜÊÇ¿ìÓÚÏûÍöµ¼ÖÂÁËä¯ÀÀÆ÷¼æÈÝÊdzÉÁË̸²»ÍêµÄ»°Ì⡣˵µ½ä¯ÀÀÆ÷¼æÈÝ£¬CSS HACK×ÔÈ»¶øÈ»µØ±»ÎÒÃÇÏëÆð¡£½ñÌ죬ÎÒÃÇͨ³£¶¼ÓÐÒ»¸öÍŶӻòÕß½«ÓÐÒ»¸öÍŶӵÄÈËÔÚÒ»¸ö¹«Ë¾ÀïÃæ×öÏàͬµÄÊ£¬ÐèÒªÎÒÃÇÓÐͳһµÄ¹æ·¶À´½øÐÐCoding£¬ÒÔ·½±ãά»¤¡£¶ø½â¾ö¼æÈݵķ½·¨¾ÍÊÇ£¨±ØÐëÊÇ£¬ÒòΪÕâ²Å×îÈÝÒ×ÓÐÎÊÌâµÄ£©ÆäÖÐÒ»¸ö×îÖØÒªµÄ¡¢Òª½â¾öµÄ¹æ·¶Ö®Ò»¡£
ÔÚ½â¾ö¼æÈÝ·½·¨ÉÏ£¬Ï붨³öÒ»¸öͳһµÄ¹æ·¶£¬¸öÈËÈÏΪӦ¸ÃÒÔÏÂÃæ3µãΪ»ù±¾ÔÔò£º
Ȩºâ³É±¾£ºÔÚä¯ÀÀÆ÷±»ÌÔ̺ó£¬ÈçºÎ¿ìËÙÇåÀíµôÎÞÓôúÂë
¿Éά»¤£ºÔÚ×ÊÔ´³É±¾ºÍÍêÃÀ¼äƽºâµÄÏòºó¼æÈÝ
¿É¶Á£ºÊ¡Á¦¡¢Ò×¼Ç
ÕâÀï°Ñ³É±¾·ÅÔÚÁ˵Úһ룬²¢²»ÊÇ˵ÎÒÃDz»Ô¸Òâ×·ÇóÍêÃÀ£¬¶øÖ»ÊÇ£¬Ì«¿ÌÒâ×·ÇóÍêÃÀÓÐʱºò¿ÉÄÜ»á×è°ÎÒÃÇÇ°½ø£»Ôڳɱ¾ºó£¬Ó¦¸ÃÊÇ¿Éά»¤ºÍ¿É¶Á£¬Õâµã¶ÔÓÚÍŶӵĺÏ×÷À´ËµÖÁ¹ØÖØÒª£¬¶ø×îÖÕ½á¹ûÒ²ÊÇΪÁ˼õÉٳɱ¾¡£
ÏÈ°ÑÕâÈý¸öÔÔò´æÆðÀ´£¬À´¿´¿´ÎÒÃÇƽʱ½â¾ö¼æÈݵÄд·¨£¨ºóÃæ»á¸½ÏêϸµÄHack·½·¨ÁÐ±í£©£º
Ò»¡¢CSS Ñ¡ÔñÆ÷ Hack
1
2
3
/* Opera */
@media all and (-webkit-min-device-pixel-ratio:10000), not all and (-webkit-min-device-pixel-ratio:0)
{
head~body
.sofish
{
display
:
block
;
}
}
ÕâÖÖд·¨µÄÓÅȱµãÊÇ£º
Óŵ㣺ȫÃ棬¸÷ÖÖHACK¶¼ÓУ»ÇåÀíÎÞÓôúÂëÀïÒ×ÈÏ
ȱµã£ºÑ¡ÔñÆ÷Ãû³Æ²»Ò׼ǣ»´úÂëÁ¿¶à£¨ÒªÖظ´Ð´Ñ¡ÔñÆ÷£©
¶þ¡¢CSS ÊôÐÔ Hack
1
2
3
4
5
6
7
8
.sofish
{
padding
:
10px
;
padding
:
9px
\9
;
/* all ie */
padding
:
8px
\0
;
/* ie8-9 */
*
padding
:
5px
;
/* ie6-7 */
+
padding
:
7px
;
/* ie7 */
_padding:
6px
;
/* ie6 */
}
ÕâÖÖд·¨µÄÓÅȱµãÊÇ£º
Óŵ㣺Ò׼ǣ»´úÂëÉÙ
ȱµã£º²»È«Ãæ
Èý¡¢IE ×¢ÊÍ
1
2
<!--[if IE]>IE only<![endif]-->
<!--[if !IE]>NOT IE<![endif]-->
ÕâÖÖд·¨µÄÓÅȱµãÊÇ£º
Óŵ㣺°²È«£»Ïòºó¼æÈݺã»Ò×ά»¤
ȱµã£ºÓ
Ïà¹ØÎĵµ£º
µØÕð ÍøÕ¾±ä³É»ÒºÚÉ« css ´úÂë
5.19-5.21Ϊȫ¹ú°§µ¿ÈÕ£¬ °Ù¶È¡¢ÍøÒס¢ÐÂÀ˵ȸ÷´óÍøÕ¾¾ù±ä³ÉÁ˻ҺÚÉ«ÍøÒ³¡£ÔõÑùʹÍøÒ³±ä³É»ÒºÚÉ«ÄØ£¿
¹úÎñÔº¾ö¶¨5ÔÂ19ÈÕÖÁ21ÈÕΪȫ¹ú°§µ¿ÈÕΪ·½±ãÕ¾µã°§µ¿£¬ÌØÌṩcssÂ˾µ´úÂ룬ÒÔ±í°§µ¿¡£ÒÔÏÂΪȫվCSS´úÂë¡£
html {...}{ filter:progid:DXImageTransform.Microsoft.BasicImage(g ......
Ô¤¶ÁÄÚÈݶÔÓÚ²¿·ÖÍøËÙÂý£¬»òÕß¼ÓÔØÄÚÈݹý¶àµÄÒ³Ã棬ÊǷdz£ÓÐЧµÄÌá¸ßÓѺó̶ȵķ½·¨¡£·ÀÖ¹³öÏÖÓÉÓÚÑùʽ±í£¬ºÍ¹Ø¼üͼƬ¼ÓÔØÖͺ󣬵¼ÖµÄÒ³Ãæ²¼¾Ö´íÂÒ£¬ÒÔ¼°¹Ø¼üͼƬ²»ÄÜÂíÉÏչʾ¡£
Ò²¿ÉÒÔ·ÀÖ¹ÓÉÓÚÒ³ÃæÐÅÏ¢¼ÓÔز»È«£¬µ¼ÖÂjs³ö´í¡£
¾¹ýÒ»·¬³¢ÊÔ£¬´Ë·½·¨¿ÉÒÔ¼æÈÝIE¼°ÆäËûä¯ÀÀÆ÷¡£
ÔÚIEÏÂ ÓÃ new Image().src
µÄÐÎʽ½øÐÐ ......
Íê³ÉÒÔϲ¿·Ö£º
1. Ê÷¿ÉÒÔ½ÓÊÜsingleXml¸ñʽºÍjsonÒÔ¼°jsonarray¸ñʽµÄÊý¾Ý£»
2. ¸´Ñ¡¿ò¹´Ñ¡ºÍÕÛµþ×Ó½ÚµãµÄÂß¼ÓÃdivǶÌ×À´ÊµÏÖ,ЧÂʸü¸ß;²¢ÌṩÁË¿ìËÙ»Ê÷µÄ·½·¨;(´æÔÚbug:¿ìËÙ»Ê÷ЧÂʲ¢²»¸ß,divǶÌ×ÓÐÎÊÌâ);
3.Ôö¼ÓÊ÷µÄÉî¶È this.depth ......
ÏÈÀ´¿´ÏÂposition¸÷ÊôÐԵĽâÊÍ
absolute
: Éú³É¾ø¶Ô¶¨Î»µÄÔªËØ£¬Ïà¶ÔÓÚ static ¶¨Î»ÒÔÍâµÄµÚÒ»¸ö¸¸ÔªËؽøÐж¨Î»¡£
ÔªËصÄλÖÃͨ¹ý "left", "top", "right" ÒÔ¼° "bottom&q ......
cssÊÇʲô£¿ÕâÊdzõѧÍøÒ³Éè¼ÆµÄͬѧÃÇÓöµ½µÄµÚÒ»¸öÎÊÌ⣬ÔÚѧϰÍøÒ³ÖÆ×÷֮ǰ£¬ÄãÒ»¶¨ÒªÁ˽âÍøÒ³ÖÆ×÷µÄ´ó¾Ö£¬ÓÐÁËÈ«¾ÖµÄÁ˽⣬²ÅÖªµÀÔõôȥѧϰ¡£
ÍøÒ³Éè¼Æ·ÖΪ£ºÇ°Ì¨Ò³ÃæÉè¼Æ£¬ºǫ́³ÌÐòÉè¼Æ¡£
ǰ̨ҳÃæÉè¼Æ·ÖΪ£ºhtml,css,javasript,ps,flash£¨Õ⼸¸ö¶¼ÒªÁ˽âŶ£¬ÊìÁ·ÕÆÎÕcss£©
ºǫ́³ÌÐòÉè¼Æ·ÖΪ£ºasp,php,asp.net£¨Ö»Òª ......