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

JS/CSSѹËõ¹¤¾ß YUI Compressor

YUI Compressor ÊÇÒ»¸öÓÃÀ´Ñ¹Ëõ JS ºÍ CSS ÎļþµÄ¹¤¾ß£¬²ÉÓÃJava¿ª·¢¡£
ʹÓ÷½·¨£º
//ѹËõJS
java -jar yuicompressor-2.4.2.jar --type js --charset utf-8 -v src.js > packed.js
//ѹËõCSS
java -jar yuicompressor-2.4.2.jar --type css --charset utf-8 -v src.css > packed.css


Ïà¹ØÎĵµ£º

yuiѧϰ±Ê¼Ç£¨¶þ£© ʹÓÃcss¹¤¾ß±£³ÖÒ»ÖÂÐÔ

Ëĸöcss¹¤¾ß£ºfonts,grids,reset,base
ʹԪËرê×¼»¯µÄreset.css
ÒÔÏÂÆÕͨ¶ø³£ÓõÄÔªËض¼½«marginºÍpaddingÖµ±ê×¼»¯µ½0
the document body
div and p 
ËùÓÐlist ÔªËØ£ºdl,dt,dd,ul,ol,li
±êÌ⼶ԪËØ£ºh1,h2,h3,h4,h5,h6
preºÍblockquoteÔªËØ
ijЩ±íµ¥ÔªËØ£ºform,fieldset,input,textarea
tableÔªËØ£ºt ......

×îºÃµÄcssÖØд´úÂë

Eric Meyer’s CSS Reset
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, fo ......

div+cssѧϰ1

Çø±ðspan div p Èý¸ö±êÇ©µÄÓ÷¨
spanºÍdivµÄ²»Í¬Ö®´¦ÔÚÓÚspanÊÇÄÚÁªµÄ£¬ÓÃÔÚһС¿éµÄÄÚÁªHTMLÖУ¬Ç°ºó²»¶ÏÐÐ.
divÔªËØÊǿ鼶µÄ£¨¼òµ¥µØ˵£¬ËüµÈͬÓÚÆäÇ°ºóÓжÏÐУ©£¬ÓÃÓÚ×éºÏÒ»´ó¿éµÄ´úÂë¡£
p(¶ÎÂä)ÔªËØÊǿ鼶µÄ,Ç°ºó¶ÏÐÐ,¶øÇÒ»¹ÒªÔÙ¸ôÒ»ÐÐ.Ï൱ÓÚ¶ÏÁ½ÐÐ.
<div> ¿É¶¨ÒåÎĵµÖеķÖÇø»ò½Ú£¨division ......

¡¾DIV+CSSÈëÃŽ̡̳¿Îå¡¢CSSÑ¡ÔñÆ÷

ÉϽڿÎÎÒÃǽ²ÁËÒ»ÏÂCssͨ¹ýʲô·½Ê½È¥¿ØÖÆÒ³Ãæ
£¬Èç¹û²»¼ÇµÃ£¬ÎÒÀ´°ï´ó¼Ò»ØÒäһϣ¬×ܹ²ÓÐËÄÖÖ·½Ê½ÐÐÄÚ·½Ê½¡¢ÄÚ
Ƕ·½Ê½¡¢Á´½Ó·½Ê½¡¢µ¼È뷽ʽ£¬´ó¼Òͨ¹ýÕâËÄÖÖ·½Ê½¾Í¿ÉÒÔʵÏÖCSS
¶ÔHTML
Ò³ÃæÑùʽµÄ¿ØÖÆ£¬Èç¹ûÒªÈÃÕâЩÑùʽ¶ÔHTMLÒ³ÃæÖеÄÔªËØʵÏÖÒ»¶ÔÒ»£¬Ò»¶Ô¶à»òÕ߶à¶ÔÒ»µÄ¿ØÖÆ£¬Õâ¾ÍÐè
ÒªÓõ½CSSÑ¡ÔñÆ÷£¬HTMLÒ³ÃæÖеÄÔ ......

cssÐÂÊÖÈëÃÅ½Ì³Ì ×ÝÏòÏÂÀ­¼°¶à¼¶µ¯³öʽ²Ëµ¥

×¢ÒâÊÂÏ
             ÁËʵÏÖµ¼º½ÖеÄ×Óµ¼º½ÓëÖ÷µ¼º½ÔÚʵÏÖÊó±ê½»»¥µÄͬʱ£¬±£³ÖÆäÏà¶ÔλÖÃÒ»Ö£¬ÎÒÃÇʹÓÃÁ˶Ôul li{}ʹÓÃÁËposition:relative;ʹÆ䶨λ·½Ê½×ªÎªÏà¶Ô¶¨Î»¡£¶ø¶Ôli ul{}¼´×Óµ¼º½²ÉÓÃÁËposition:absolute;Ïà¶ÔÓÚµ¼º½µÄ¾ø¶Ô¶¨Î»·½Ê½£¬ÁËÆäÊó± ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ