Magento 集成css文件到页面文件中
转载于 罗马集市
Magento的CSS文件一般存放到 $MAGENTO_INSTALLED_FOLDER/skin/{frontend | admin |
install}/<package name>/<theme
name>/css目录下。也有些和全局js脚本配合使用的css文件存放在$MAGENTO_INSTALLED_FOLDER/js下,但是一
般我们不直接调用它们。
那么Magento应用又是如何引用CSS文件的呢?
方式I. 最一般的方法是配置全局block. 在page.xml中有
Xml代码
<
default
>
<
block
type
=
"page/html"
name
=
"root"
output
=
"toHtml"
template
=
"page/3columns.phtml"
>
<
block
type
=
"page/html_head"
name
=
"head"
as
=
"head"
>
<
action
method
=
"addCss"
>
<
stylesheet
>
css/menu.css
</
stylesheet
>
</
action
>
<
action
method
=
"addItem"
>
<
type
>
skin_css
</
type
>
<
name
>
css/iestyles.css
</
name
>
<
params
/>
<
if
>
IE
</
if
>
</
action
>
</
block
>
</
block
>
</
default
>
<default>
<block type="page/html" name="root" output="toHtml" template="page/3columns.phtml">
<block type="page/html_head" name="head" as="head">
<actio
相关文档:
filter:alpha(opacity=50);-moz-opacity:0.5;
Opacity: 相对于IE。火狐似乎好像不支持。 值:以百分比为值,100 表示不透明度为100%;50侧代表不透明度为50%。
-moz-opacity: 相对于FF,火狐。 值:以小数点为值,1 表示不透明度为100%;0.5侧代表不透明度为50%。
注意:上面的滤镜IE8不支持。因此我们需要用 <meta h ......
作者:李丽媛
邮箱:lly219@gmail.com
日期:2009-1-12
前言(自说自话)
从初识CSS到现在已经5个年头了。大多是断断续续的,可是近一年来接触颇多,甚有一些些体会。
第一次接触只知道font,color,background,margin,padding等基本知识,乃至连margin、padding都分不清个所以然。
在第一次Web大作业中知道了有&ldq ......
Alert{
backgroundColor: #2791DB;
headerColors:#2791DB,#2791DB;
borderThicknessLeft:0;
borderThicknessRight:0;
borderThicknessTop:0;
font-size:14;
buttonStyleName: myCustomButtonStyleName;
}
.myCus ......
-----------------------------------------------
链接外面文件css
<link href="layout.css" rel="stylesheet" type="text/css" />
-----------------------------------------------
写文本 : <div id="mainContent">
<p>1列固定宽度居中+头部+导航+尾部—&mdash ......
body{ background:#FFFFFF; font-size:12px; font-family:‘宋体’, Arial, Helvetica, sans-serif;}
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,table,th,td,
img{margin:0;padding:0;}
.partA,.partB,.partC,.partD,.partE,.partF,.partG,.partH,.partI,. ......