Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ÔÚIE¡¢»ðºüϵļæÈÝÎÊÌâ


 
DIV£«CSSÍøÒ³²¼¾ÖÕâÊÇÒ»ÖÖÇ÷ÊÆ,ÎÒÒ²¿ªÊ¼Ë³Ó¦Õâ¹ÉÇ÷ÊÆÁË,²»¹ýÔÚʹÓÃDIV£«CSSÍøÕ¾Éè¼ÆµÄʱºò£¬Ó¦¸Ã×¢ÒâcssÑùʽ¼æÈݲ»Í¬ä¯ÀÀÆ÷ÎÊÌ⣬ÌرðÊǶÔÍêȫʹÓÃDIV CSSÉè¼ÆµÄÍøÒ³£¬¾ÍÓ¦¸Ã¸ü×¢ÒâIE6¡¢IE7¡¢FF¶ÔCSSÑùʽµÄ¼æÈÝ£¬²»È»£¬ÄãµÄÍøÒ³¿ÉÄÜÂÒµÄÒ»ËúºýÍ¿£¡ÎÒ¾­³£±»ÕâЩ¶«Î÷ÕûµÄ½¹Í·Àöî,ÓÚÊǺôÔÚÍøÉÏÕÒÁËЩ×ÊÁÏ,¼ÓÉÏ×Ô¼ºµ ......

ʹÓÃAnt¹¹½¨ÅúÁ¿Ñ¹Ëõjs¡¢cssÎļþ½Å±¾


ʹÓÃAnt¹¹½¨ÅúÁ¿Ñ¹Ëõjs¡¢cssÎļþ
ʹÓÃAntÅúÁ¿Ñ¹Ëõjs¡¢cssÎļþ
2010 Äê 01 ÔÂ 27 ÈÕ
ÌṩÁËÒ»¸öant½Å±¾£¬ËüÖ÷ÒªÓÃÓÚÅúÁ¿Ñ¹ËõÅú¶¨Ä¿Â¼ÏµÄjs¡¢cssÎļþ£¬´Ëant½Å±¾Ê¹Óõ½ÁË YUI Compressor¡¢antcontrib
.
Ant Contrib
Ö÷ҪʹÓÃËüËùÌṩµÄforeach¡¢propertyregexÕâÁ½¸ötarget
yui compressor ²Î¿¼×ÊÁÏ
ѹËõ»á´ø ......

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ÈÃͼƬ×Ô¶¯ÊÊÓ¦´óС

ͼƬ×Ô¶¯ÊÊÓ¦´óСµÄÎÊÌâÔÚƽʱÖÆ×÷µÄʱºòÊDZȽϳ£¼ûµÄÎÊÌ⣬ÏÂÃæÌṩһ¸ö±È½Ï¼òµ¥µÄ½â¾ö·½·¨£º
div img {
max-width:600px;
//IE7¡¢FFµÈÆäËû·ÇIEä¯ÀÀÆ÷ÏÂ×î´ó¿í¶ÈΪ600px;
width:600px;
//ËùÓÐä¯ÀÀÆ÷ÖÐͼƬµÄ´óСΪ600px;
width:expression(document.body.clientWidth>600?"600px":"auto");
//µ±Í¼Æ¬´óС´óÓÚ6 ......

IE6/IE7/FFµÄCSS hack ä¯ÀÀÆ÷¼æÈÝ×ܽá

IE6/IE7/FFµÄCSS hack ä¯ÀÀÆ÷¼æÈÝ×ܽá
2010-01-23 15:25
ÓÉÓÚ²»Í¬µÄä¯ÀÀÆ÷¶ÔCSSµÄÖ§³Ö¼°½âÎö½á¹û²»Ò»Ñù£¬´¦ÀíµÄÓÅÏȼ¶²»Ò»Ñù¡£Õë¶Ô²»Í¬µÄä¯ÀÀÆ÷À´Ð´²»Í¬µÄCSS´ïµ½ÔÚ²»Í¬ä¯ÀÀÆ÷ÏÂÏÔʾÏëÒªµÄЧ¹û¾ÍÊÇcss hack¡£ÏÈÌùÁ½¸öÖ±¹ÛµÄ¶Ô±Èͼ£º
ÔÙÌùÒ»¶Î´úÂ룺
#bgcolor {
background:red !important; /* Firefox µÈÆäËûä¯ÀÀÆ÷ * ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ