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 xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>一个比较不错的C ......
1.图片的垂直居中
.box
{
/*非IE的主流浏览器识别的垂直居中的方法*/
display: table-cell;
vertical-align: middle; /*设置水平居中*/
text-align: center;
/* 针对IE的Hack */
*display:block;
......
、在Flash加入:<param name="wmode" value="opaque">
2、在DIV里加入:position:absolute;z-index:10;(数字越大越处于上层)
FLASH透明背景
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0 ......