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 ......
When you meet trouble with css style in IE7, try this. You can set different css for IE7 and the other browsers.
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="/home_c_ie7.css" mce_href="home_c_ie7.css" />
<![endif]-->
......
css+div和table+css的比较
CSS+DIV是网站标准(或称“WEB标准”)中常用的术语之一,通常为了说明与HTML网页设计语言中的表格(table)定位方式的区别,因为XHTML网站设计标准中,不再使用表格定位技术,而是采用css+div的方式实现各种定位。
CSS+DIV网站设计的优势
首先,CSS的 ......
<html>
<head>
<meta http-equiv="Content-Language" content="en" />
<meta name="GENERATOR" content="Zend Studio" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jquery test</title>
</head>
<style>
.lastp{bord ......
原理:
当两个同父元素z-index相同时,后面的元素显示在上面。
当z-index超过浏览器最大值时,浏览器会按最大值计算。
方法:
连续放置两个div元素d1,d2;并设定position:absolute及不同背景色。
设定d1.z-index = max + 1, d2.z-index = max;
当max + 1有效时,d1在前;当max + 1 无效时,d2在前。(参看原理) ......