Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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/


Ïà¹ØÎĵµ£º

CSS:marginÊôÐÔ±¸Íü

²Î¿¼×ÊÁÏ£ºhttp://www.blueidea.com/tech/web/2007/4546.asp£¬ÓÉdzÈëÉîÂþ̸marginÊôÐÔ - ÍøÒ³ÖÆ×÷ - À¶É«ÀíÏë
Ö±½ÓÉÏ´úÂ룺
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>aaa</title>
    <style type="text/css">
    html  { }
......

´¿CSSÏÂÀ­²Ëµ¥


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<!-- www.div-css.com ÍøÕ¾±ê×¼»¯  2007-4-16 -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
......

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 clientWidth£¬offsetWidth µÈÏà¹ØÊôÐÔ

ÍøÒ³¿É¼ûÇøÓò¿í£º document.body.clientWidth;
ÍøÒ³¿É¼ûÇøÓò¸ß£º document.body.clientHeight;
ÍøÒ³¿É¼ûÇøÓò¿í£º document.body.offsetWidth   (°üÀ¨±ßÏߵĿí);
ÍøÒ³¿É¼ûÇøÓò¸ß£º document.body.offsetHeight (°üÀ¨±ßÏߵĿí);
ÍøÒ³ÕýÎÄÈ«ÎÄ¿í£º document.body.scrollWidth;
ÍøÒ³ÕýÎÄÈ«Îĸߣº document.body. ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ