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

»ñÈ¡¶ÔÏóCSSÊôÐÔ

//»ñÈ¡Ò»¸öÌض¨ÔªËصÄÑùʽÊôÐÔ
function getStyle(elem,name){
//Èç¹û¸ÃÊôÐÔ´æÔÚÓÚstyleÖÐ ÔòËû×î½ü±»ÉèÖùý
if(elem.style[name]){
return elem.style[name];
}
//·ñÔò³¢ÊÔIE·½·¨
else if(elem.currentStyle){
return elem.currentStyle[name];
//W3C·½·¨
}else if(document.defaultview && document.defaultView.getComputedStyle){
name=name.repalce("/([A-Z])/g","-$1");
name=name.toLowerCase();
var s = document.defaultView.getComputedStyle(elem,"");
return s && s.getPropertyValue(name);
}else{
return null;
}
}


Ïà¹ØÎĵµ£º

×îºÃµÄ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 ......

ÓÃJSÀ´Çл»CSS£¬ºÜºÃºÜ¼òµ¥

¼ÙÈçÎÒÃÇÏëͨ¹ýǰ̨×ÔÖ÷Ñ¡ÔñCSSÑùʽÀ´´ïµ½¸Ä±äÑÕÉ«¡¢·ç¸ñµÈÄ¿µÄµÄ»°£¬ÓÃJSµ÷ÓÃCSSÎļþ¾ÍOK¡£
ÏÈ×öÁ½¸ö£¨»ò¶à¸ö£©CSSÎļþ¡£
style_1.css¡¡´úÂ룺
body{background-color: #ccff66;}
......
style_2.css¡¡´úÂ룺
body{background-color: #ff0000;}
......
JS´úÂëÈçÏ£º
<link rel="stylesheet" rev="stylesheet" ......

¡¾DIV+CSSÈëÃŽ̡̳¿¶þ¡¢Ê¹ÓÃTable²¼¾ÖÊDz»Ã÷ÖǵÄ

ʹÓÃTable²¼¾ÖÒ³ÃæΪʲôÊDz»Ã÷Öǵģ¿
´ó¼Ò¿´µ½±êÌ⣬²»ÒªÎó½âÈÏΪÔÚÒ³ÃæÖв»ÄÜʹÓÃTable£¬¶øÊÇ¿ÉÒÔ
ʹÓÃTable£¬µ«ÊǾ¡Á¿²»ÒªÓÃTableÈ¥²¼¾ÖÒ³Ã棬ΪʲôÕâô˵ÄØ£¬ÒòΪʹÓÃTable²¼¾ÖÒ³Ãæ»áʹҳÃæʧȥÁé»îÐÔ£¬Ôõô¸öÁé»î·¨ÄØ£¬±ÈÈç½ñÌìÄãºÃ²»
ÈÝÒ××ö³öÀ´µÄÒ³Ã棬µÚ¶þÌìÀÏ°å˵ÎÒ²»Ï²»¶µÇ¼ģ¿é·Åµ½Óұߣ¬»¹ÊǷŵ½×ó±ß£¬Í¨Ö ......

¡¾DIV+CSSÈëÃŽ̡̳¿ËÄ¡¢CSSÈçºÎ¿ØÖÆÒ³Ãæ


±¾½ÚÖ÷Òª½²½â£¬Á½¸öÄÚÈÝ£¬
µÚÒ»£ºCSS
ÈçºÎ¿ØÖÆÒ³ÃæÑùʽ£¬ÓÐ
¼¸ÖÖ·½Ê½£»
µÚ¶þ£ºÕâЩ·½Ê½³öÏÖÔÚͬһ¸öÒ³ÃæʱµÄÓÅÏȼ¶¡£
      Ê¹ÓÃxHTML
+CSS
²¼¾ÖÒ³Ã棬ÆäÖÐÓиöºÜÖØÒªµÄÌصã¾ÍÊÇÄÚÈÝÓë±íÏóÏà·ÖÀ룬ÄÚÈÝÖ¸HTMLÒ³Ãæ´úÂ룬±íÏó¾ÍÊÇCSS´úÂëÁË£¬Èç¹û°ÑÒ³Ãæ¿´³É´©×ÅÒ·þµÄÈ˵Ļ°£¬È˾ÍÊÇ
HTML£¬ÊÇÄ ......

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 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ