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

DIV+CSSÉè¼ÆÊ±ä¯ÀÀÆ÷¼æÈÝÐÔÎÊÌâ

ÔÚÕâÖÖä¯ÀÀÆ÷ÏÂÏÔʾÕý³££¬ÔÚÁíÒ»ÖÖϾÍÂÒÁË£¬ÎÒÃÇÔÚ±àдCSSµÄʱºò»áºÜÄջ𣬸ÕÐÞ¸´ÁËÕâ¸öä¯ÀÀÆ÷µÄÎÊÌ⣬½á¹ûÁíÍâÒ»¸öä¯ÀÀÆ÷È´³öÁËÐÂÎÊÌâ¡£

-
  
ʲôÊÇä¯ÀÀÆ÷¼æÈÝ£ºµ±ÎÒÃÇʹÓò»Í¬µÄä¯ÀÀÆ÷£¨Firefox IE7
IE6£©·ÃÎÊͬһ¸öÍøÕ¾£¬»òÕßÒ³ÃæµÄʱºò£¬»á³öÏÖһЩ²»¼æÈݵÄÎÊÌ⣬ÔÚÕâÖÖä¯ÀÀÆ÷ÏÂÏÔʾÕý³££¬ÔÚÁíÒ»ÖÖϾÍÂÒÁË£¬ÎÒÃÇÔÚ±àдCSSµÄʱºò»áºÜÄջ𣬸ÕÐÞ¸´
ÁËÕâ¸öä¯ÀÀÆ÷µÄÎÊÌ⣬½á¹ûÁíÍâÒ»¸öä¯ÀÀÆ÷È´³öÁËÐÂÎÊÌâ¡£ºÃ°É£¬ÎÒ·þÁËÐаɣ¬ÄÇÎÒ¾ÍÀûÓÃÄãÃǵIJ»¼æÈݸ÷дһ¶Îcss,ÈÃËûÃǸ÷Ö´Ðи÷µÄ£¬ºÇºÇ¡£ 
Ò»¡¢!important (¹¦ÄÜÓÐÏÞ) 
Ëæ×ÅIE7¶Ô!importantµÄÖ§³Ö, !important ·½·¨ÏÖÔÚÖ»Õë¶ÔIE6µÄ¼æÈÝ.(×¢Òâд·¨.¼ÇµÃ¸ÃÉùÃ÷λÖÃÐèÒªÌáǰ.) 
ÀýÈç: 
#example { 
width: 100px !important; /* IE7+FF */ 
width: 200px; /* IE6 */ 

¶þ¡¢CSS HACKµÄ·½·¨(ÐÂÊÖ¿ÉÒÔ¿´¿´£¬¸ßÊ־͵±Â·¹ý°É) 
Ê×ÏÈÐèÒªÖªµÀµÄÊÇ£º 
ËùÓÐä¯ÀÀÆ÷ ͨÓà height: 100px; 
IE6 רÓà _height: 100px; 
IE7 רÓà *+height: 100px; 
IE6¡¢IE7 ¹²ÓÃ *height: 100px; 
IE7¡¢FF ¹²ÓÃ height: 100px !important; 
ÀýÈ磺 
#example { height:100px; } /* FF */ 
* html #example { height:200px; } /* IE6 */ 
*+html #example { height:300px; } /* IE7 */ 
ÏÂÃæµÄÕâÖÖ·½·¨±È½Ï¼òµ¥ 
¾Ù¼¸¸öÀý×Ó£º 
1¡¢IE6 - IE7+FF 
#example { 
height:100px; /* FF+IE7 */ 
_height:200px; /* IE6 */ 

ÆäʵÕâ¸öÓÃÉÏÃæËµµÄµÚÒ»ÖÖ·½·¨Ò²¿ÉÒÔ 
#example { 
height:100px !important; /* FF+IE7 */ 
height:200px; /* IE6 */ 

2¡¢IE6+IE7 - FF 
#example { 
height:100px; /* FF */ 
*height:200px; /* IE6+IE7 */ 

3¡¢IE6+FF - IE7 
#example { 
height:100px; /* IE6+FF */ 
*+height:200px; /* IE7 */ 

4¡¢IE6 IE7 FF ¸÷²»Ïàͬ 
#example { 
height:100px; /* FF */ 
_height:200px; /* IE6 */ 
*+height:300px; /* IE7 */ 

»ò£º 
#example { 
height:100px; /* FF */ 
*height:300px; /* IE7 */ 
_heigh


Ïà¹ØÎĵµ£º

CSSÔÚÏßÓÅ»¯

×î½üÔÚÍøÉÏÕÒµ½Á˼¸¿îCSSÔÚÏßÓÅ»¯Æ÷£¬×Ô¼ºÊÔÁËÊÔ£¬·ÅÉÏÀ´¸ú´ó¼Ò·ÖÏíһϡ£
1. Online CSS Optimizer /ÔÚÏßCSSÓÅ»¯
¸ÃÔÚÏß¹¤¾ßÓÃÓÚ¾«¼òºÍѹËõÑùʽ±íµÄÎļþ´óС£¬ÓÅ»¯ºóµÄ´úÂ뽫ÍêÈ«ÊÇ»ìÂҵģ¬Ö§³ÖÊäÈëURL£¬Ìá½»ÎļþºÍÖ±½ÓÊäÈë½øÐÐѹËõ¡£
2. CSS Compressor/CSSѹËõ
×÷ÓÃͬÉÏ£¬µ«Õâ¸ö¹¤¾ßÓµÓзdz£ÏêϸµÄѹËõÑ¡ÏËü°üº¬» ......

È«Ãæ¼æÈÝIE6/IE7/IE8/FFµÄCSS HACKд·¨

margin-bottom:40px;       /*ffµÄÊôÐÔ*/
margin-bottom:140px\9;    /* IE6/7/8µÄÊôÐÔ */
color:red\0;              /* IE8Ö§³Ö */
*margin-bottom:450px;     /*IE6/7µÄÊôÐÔ*/ ......

CSS²ãµþ¼ÓµÄÔ­Ôò

¾²Ì¬¶¨Î»£ºposition:static£¨ÎªpositionÊôÐÔµÄĬÈÏÖµ£©¡£    
¶¯Ì¬¶¨Î»£ºposition:relative»òposition:absolute»òposition:fixed¡£    
×æÔªËØ£ºÈÎÒâ°üº¬¸ÃÔªËØµÄÔªËØ¡£     ¸¸ÔªËØ£ºÖ±½Ó°üº¬¸ÃÔªËØµÄ×æÔªËØ¡£     ͬ±²ÔªËØ£ºÓµÓй²Í¬µÄ¸¸ÔªËصÄÔªËØ¡£
×¢£ºÕâЩ¸Å
ÄîΪ×÷Õß ......

ת:ÓÐÀûÓÚSEOµÄDIV+CSSµÄÃüÃû¹æÔò

ÎÄÕÂת×ÔÓÚ:http://www.pqshow.com/design/Dreamweaver/200912/12674.html
ÓÉÓÚÏîÄ¿ÖбàдÎĵµ½á¹¹¡¢±àдCSSµÄÈËÔ±½Ï¶à£¬²¢Óë³ÌÐòԱЭͬ¹¤×÷£¬ËùÒÔ¾ÍÐèҪͳһ¿ª·¢¹æ·¶£¬¸ù¾ÝXHTMlºÍCSS±àÖ¯µÄ¹æ·¶ºÍ´ó¶àÈ˵Äϰ¹ß£¬ÕûÀíÁËÒÔÏÂÕë¶Ô±¾ÏîÄ¿µÄÒ»¸ö¼òµ¥µÄ¿ª·¢¹æ·¶£º
Ò»¡¢CSSÎļþ¼°ÑùʽÃüÃû
1¡¢CSSÎļþÃüÃû¹æ·¶
È«¾ÖÑùʽ£ºgl ......

div+cssä¯ÀÀÆ÷¼æÈÝÎÊÌâ½â¾ö·½·¨


div+cssä¯ÀÀÆ÷¼æÈÝÎÊÌâ½â¾ö·½·¨
´ÓÍøÉÏÊÕ¼¯ÁËIE7,6ÓëFireofxµÄ¼æÈÝÐÔ´¦Àí·½·¨²¢ÕûÀíÁËÒ»ÏÂ.¶ÔÓÚweb2.0µÄ¹ý¶È,Ç뾡Á¿ÓÃxhtml¸ñʽд´úÂë,¶øÇÒDOCTYPE Ó°Ïì CSS ´¦Àí,×÷ΪW3CµÄ±ê×¼,Ò»¶¨Òª¼Ó DOCTYPEÉùÃû. 
 
CSS¼¼ÇÉ
 
1.divµÄ´¹Ö±¾ÓÖÐÎÊÌâ vertical-align:middle; ½«ÐоàÔö¼Óµ½ºÍÕû¸öDIVÒ»Ñù¸ß
line- ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ