Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

CSS Hack¸÷ä¯ÀÀÆ÷

CSS Hack ÊÇÔÚ±ê×¼ CSS û°ì·¨¼æÈݸ÷ä¯ÀÀÆ÷ÏÔʾЧ¹ûʱ²Å»áÓÃÉϵIJ¹¾È·½·¨,ÔÚ¸÷ä¯ÀÀÆ÷³§É̽âÎö CSS ûÓдï³ÉÒ»ÖÂÇ°,ÎÒÃÇÖ»ÄÜÓÃÕâÑùµÄ·½·¨À´Íê³ÉÕâÑùµÄÈÎÎñ¡£ÍøÉÏÄã¿ÉÄÜÄÜËÑË÷µ½Ò»´ó¶ÑµÄ CSS Hack£¬µ«ÊÇÎÒ½ñÌì·¢²¼µÄÄã¿ÉÄܲ¢²»¶¼ºÜÁ˽⣬ÒòΪÕâЩ¶¼ÊÇÖ»Õë¶Ôµ¥¶ÀÒ»¸öä¯ÀÀÆ÷µÄ CSS Hack¡£
ΪÁËÏòÄãչʾÕâЩ CSS Hack ÊÇ·ñÕý³£ÔË×÷£¬ÎÒн¨Áù¸ö P ±êÇ©£¬²¢¸øÿһ¸ö P ±êÇ©Ò»¸öÌØÓÐµÄ id¡£Õ⽫ÏòÄãչʾ CSS Hack µÄÔË×÷Çé¿ö¡£
<p id="opera">ÎÒÀ´×Ô Opera 7.2 - 9.5</p>
<p id="safari">ÎÒÊÇÉñÆæµÄ Safari</p>
<p id="firefox">ÎÒÀ´×Ô Firefox</p>
<p id="firefox12">ÎÒÊÇÄãÒ¯Ò¯ Firefox 1 - 2 </p>
<p id="ie7">ÎÒÊÇ囧 IE 7</p>
<p id="ie6">ÎÒÊÇÄÔȳ IE 6</p>
È»ºóÎÒÈÃÕâЩ P ±êǩĬÈ϶¼²»ÏÔʾ
<style type="text/css">
body p{display: none;}
</style>
ʹÓà IE CSS Ìõ¼þ×¢ÊÍÇø·Ö IE ä¯ÀÀÆ÷
×î¼òµ¥µÄÇø·Ö IE ä¯ÀÀÆ÷µÄ·½·¨×ÔÈ»ÊÇʹÓÃËûÃǵÄÌõ¼þ×¢ÊÍ¡£ ΢Èí´´½¨ÁËÒ»¸öÇ¿´óµÄÓï·¨À´ÈÃÎÒÃÇȥʵÏÖÕâ¸ö¹¦ÄÜ¡£ÎÒ²»ÏëÔÙÏêϸµØ½éÉÜ IE Ìõ¼þ×¢ÊÍÁË£¬ÎÒÏëÄãÔÚËÑË÷ÒýÇæÄÜËÑË÷µ½ÉÏÍò¸öËÑË÷ÌõÄ¿£¬ÎÒÕâÀïÖ»ÒªÕâÁ½¸ö:
<!--[if IE 7]>
<style type="text/css">
</style>
<![endif]-->

<!--[if IE 6]>
<style type="text/css">
</style>
<![endif]-->
ʹÓà CSS ½âÎöÆ÷ Hacks Çø·Ö IE
Ëä˵ IE Ìõ¼þ×¢ÊÍÊ®·Ö¼òµ¥ºÃÓ㬵«ÊÇÈç¹ûÄãÏë°ÑÈ«²¿µÄ CSS ·Åµ½Ò»¸öÎļþÀïµÄ»°£¬ÄÇôÄã²»µÃ²»Ê¹ÓñðµÄ·½·¨¡£×¢ÒâÕâÀïµÄ IE 7 Hack½«Ö»¶Ô IE7 ÓÐЧ£¬ÒòΪ IE6 ¸ù±¾²»ÖªµÀ > Ñ¡Ôñ·û¡£Í¬Ê±ÄãÒ²µÃ×¢Òâ > Ñ¡Ôñ·û¶ÔÓÚÆäËûä¯ÀÀÆ÷ͬÑùÊÇÎÞЧµÄ¡£
/* IE 7 */
html > body #ie7
{*display: block;}

/* IE 6 */
body #ie6
{_display: block;}
CSS Hack Çø·Ö Firefox
µÚÒ»¸öʹÓÃÁË body:empty À´Çø·Ö Firefox 1 ºÍ 2 ¡£µÚ¶þ¸ö hackʹÓÃÁËÈ«²¿ Firefox ä¯ÀÀÆ÷µÄרÓÐÀ©Õ¹ -moz¡£ -moz Ö»¶Ô FirefoxÓÐЧ£¬Ê¹ÓÃÕâ¸ö Hack ´ó¿É²»±Øµ£ÐÄÆäËûä¯ÀÀÆ÷µÄÓ°Ïì¡£
/* Firefox 1 - 2 */
body:empty #firefox12
{display: block;}

/* Firefox */
@-moz-document url-prefix()
{#firefox { display: block; }}
CSS Hack Çø·Ö Safari
Safari µÄ CSS hack Óë Firefox µÄ hack ¿´ÆðÀ´ºÜÏñ£¬Ê¹ÓõÄÊÇ Safariä¯ÀÀÆ÷µÄ


Ïà¹ØÎĵµ£º

cssµ¼º½²Ëµ¥£¨°üº¬ºáÏò×Ӳ˵¥£©

Ç¿ÁÒÍƼöÒ»¿îCSSµ¼º½²Ëµ¥£¬Óõ½Õþ¸®Ñ§Ð£ÀàÍøÕ¾Éϳ¬¼¶²»´í¡£
ÓеãÀàËÆÕ¾³¤Íø²Ëµ¥µÄζµÀ£¬Ö»²»¹ýÑÕÉ«²»Ò»Ñù¶øÒÑ£¬ÕâÖֲ˵¥»¹²»ÊÇÕæÕýÒâÒåÉϵēÏÂÀ­”²Ëµ¥£¬Ó¦¸Ã½Ð»¬³ö²Ëµ¥<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transition ......

Zen Coding: Ò»ÖÖ¿ìËÙ±àдHTML/CSS´úÂëµÄ·½·¨


Zen Coding: Ò»ÖÖ¿ìËÙ±àдHTML/CSS´úÂëµÄ·½·¨
À´Ô´£ºhttp://www.javaeye.com/news/13149
Òë×Ô£ºSmashing Magazine
ÖÐÎÄ£ºZen Coding: Ò»ÖÖ¿ìËÙ±àдHTML/CSS´úÂëµÄ·½·¨
ÔÚ±¾ÎÄÖÐÎÒÃǽ«Õ¹Ê¾Ò»ÖÖеÄʹÓ÷ÂCSSÑ¡ÔñÆ÷µÄÓï·¨À´¿ìËÙ¿ª·¢HTMLºÍCSSµÄ·½·¨¡£ËüÓÉSergey Chikuyonok¿ª·¢¡£
ÄãÔÚдHTML´úÂë(°üÀ¨ËùÓбêÇ©¡¢ÊôÐÔ¡¢ ......

CSS¹«ÓÃÎļþ

ÓÉÓÚ¸÷ä¯ÀÀÆ÷µÄĬÈÏCSSÑùʽ²»Ò»Ñù£¬ÎÒÃDZØÐëдһ¸öCSS ResetͳһÆðÀ´¡£
ͨ³£ÎÒµÄ×ö·¨ÊÇÔÚcommon.cssÀïдȫ¾Ö¿ØÖÆ£¬ÕâÀïÃæÒ²°üÀ¨headerºÍfooter£¬ÆäËüCSSÎļþ¾Íͨ¹ý@import url(”
common.css”);ÒýÓá£
body{padding:10px;margin:0;background:#fff;font-size:12px;line-height:14px;color:#333;font-
family ......

¸÷ä¯ÀÀÆ÷רÊôCSS HACK:FIREFOX/OPERA/SAFARI/IE

CSS Hack ÊÇÔÚ±ê×¼ CSS û°ì·¨¼æÈݸ÷ä¯ÀÀÆ÷ÏÔʾЧ¹ûʱ²Å»áÓÃÉϵIJ¹¾È·½·¨,ÔÚ¸÷ä¯ÀÀÆ÷³§É̽âÎö CSS ûÓдï³ÉÒ»ÖÂÇ°,ÎÒÃÇÖ»ÄÜÓÃÕâÑùµÄ·½·¨À´Íê³ÉÕâÑùµÄÈÎÎñ¡£ÍøÉÏÄã¿ÉÄÜÄÜËÑË÷µ½Ò»´ó¶ÑµÄ CSS Hack£¬µ«ÊÇÎÒ½ñÌì·¢²¼µÄÄã¿ÉÄܲ¢²»¶¼ºÜÁ˽⣬ÒòΪÕâЩ¶¼ÊÇÖ»Õë¶Ôµ¥¶ÀÒ»¸öä¯ÀÀÆ÷µÄ CSS Hack¡£
ΪÁËÏòÄãչʾÕâЩ CSS Hack ÊÇ·ñÕý³£Ô ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ