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 { }
......
<!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设计的网站是按照W3C标准的,如果一个站点完全是CSS+DIV制作的,那么你网站的SEO(搜索引擎优化)工作已经完成了30%!为什么会这么说?SEO其他方面在哪好,请接着我的思路往下看:
石家庄网站优化
DIV+CSS 网站相当30%的SEO工作
1、div+css网站遵循“网页结构、表现、行为分离,互不干涉抢功”理念,且 ......
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 ......
效果图:
csstest.css
*{
margin-left:0;
margin-top:0;
font-size:12px;
color:White;
}
#biaoge
{
/*对ID为biaoge的标签使用此CSS*/
width:405px; /*列宽100,加上五个为1的边距,四列就是405*/
&nbs ......