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/
相关文档:
参考资料:http://www.blueidea.com/tech/web/2007/4546.asp,由浅入深漫谈margin属性 - 网页制作 - 蓝色理想
直接上代码:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>aaa</title>
<style type="text/css">
html { }
......
1.图片的垂直居中
.box
{
/*非IE的主流浏览器识别的垂直居中的方法*/
display: table-cell;
vertical-align: middle; /*设置水平居中*/
text-align: center;
/* 针对IE的Hack */
*display:block;
......
网页可见区域宽: document.body.clientWidth;
网页可见区域高: document.body.clientHeight;
网页可见区域宽: document.body.offsetWidth (包括边线的宽);
网页可见区域高: document.body.offsetHeight (包括边线的宽);
网页正文全文宽: document.body.scrollWidth;
网页正文全文高: document.body. ......
Putting the CSS Friendly Control Adapters to work
Menu Control Horizontal Layout - Asp.net 2.0
Putting the CSS Friendly Control Adapters to work
The CSS Friendly Control Adapters 1.0 override the default HTML generated by the ASP.NET Web controls to provide a more standar ......
用CSS让元素居中显示并不是件很简单的事情。同样的CSS居中设置在不同浏览器中的表现也各有千秋。本文就介绍了在CSS中常见的几种让元素水平居中显示的方法。
1.使用自动外边距实现居中
CSS中首选的让元素水平居中的方法就是使用margin属性—将元素的margin-left和margin-right属性设置为auto即可。在实际使用 ......