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

magento Ìí¼Ócss js


magento¸ö±ðÒ³ÃæÌí¼ÓcssºÍjsÎļþ£¬¿ÉÒÔ½«Æä·ÅÔÚ¸ö±ðÒ³ÃæµÄxmlÖУ¬»òÕß·ÅÔÚCMSµÄlayout updateÖУ¬Æä´úÂëºÍÎļþ´æ·ÅλÖÃÈçÏÂ
<reference name="head">
<action method="addCss"><stylesheet>css/mystyles.css</stylesheet></action>
//Ìí¼Ócss mystyles.css ÎļþÔÚ /skin/frontend/Ö÷Ìâ°üÎļþ¼Ð/Ö÷ÌâÎļþ¼Ð/css
<action method="addItem"><type>skin_js</type><name>js/myjs.js</name></action>
//Ìí¼Ójs  myjs.js ÎļþÔÚ /skin/frontend/Ö÷Ìâ°üÎļþ¼Ð/Ö÷ÌâÎļþ¼Ð/js
<action method="removeItem"><type>js</type><name>prototype/prototype.js</name></action>
//ɾ³ýjs ´Ëprototype.jsÎļþÔÚmagento¸ùĿ¼µÄ jsÎļþ¼Ð

</reference>
³ö´¦£ºhttp://www.hellokeykey.com/magento-add-css-js/


Ïà¹ØÎĵµ£º

µ¼ÈëÍⲿJSÎļþºÍÍⲿCSSÎļþ

1 µ¼ÈëÍⲿjsÎļþ£º
      1.<script type="text/javascript" src="myjs/xx.js"></script>
      2.<script language="javascript" src="myjs/xx.js"></script>
 
2 µ¼ÈëÍⲿcssÎļþ£º
 <link  rel="stylesheet" ty ......

DIV+CSSÄѵãÖ®¾­Ñé×ܽá

1¡¢ÍøÒ³¾ÓÖÐÏÔʾ£º
    ÐèÒªÉèÖÃÁ½¸öµØ·½£¬Ò»¸öÊÇbody£¬Ò»¸öÊÇÍâ±ß¿òdiv¡£
    CSS£º
body{
 margin:0;
 padding:0;
 text-align:center;
}
#main{ /*×îÍâ²ãDIV*/
 width:760px;
 margin:0 auto;
 padding:0
}
    2¡¢ÎÄ×Ö´¹Ö±¾ ......

Ò»¸ö²»´íµÄCSSÑùʽ°´Å¥

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Ò»¸ö±È½Ï²»´íµÄC ......

CSSÔÚUL UIÉϵÄÓ¦ÓÃ

Ч¹ûͼ£º
csstest.css
*{
 margin-left:0;
 margin-top:0;
 font-size:12px;
 color:White;    
}
#biaoge
{
/*¶ÔIDΪbiaogeµÄ±êǩʹÓôËCSS*/
    width:405px;   /*Áпí100£¬¼ÓÉÏÎå¸öΪ1µÄ±ß¾à£¬ËÄÁоÍÊÇ405*/
  &nbs ......

Ìí¼ÓÍ·ÎļþÖеÄxml,script,cssµÈÄÚÈÝ·½·¨

function   $import(path,type,title,idname){  
          var   s,i;  
          if(type=="js"){  
         &nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ