Css条件样式表
Css中的条件样式表
<!--[if lte IE 6 ]>
<link rel="stylesheet" href="ie6.css" mce_href="ie6.css" media="all"
type="text/css"/>
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" href="ie7.css" mce_href="ie7.css" media="all"
type="text/css"/>
<![endif]-->
下面几个运算符都是可用的: lte(less than of equals:不大于), lt( less than:小于),gt(greater than:大于) 或者gte(greater than or equals: 不小于)
当表达式为等于的时候,可以省略运算符。
相关文档:
我在www.c09.com 发表了这个笔记并上传了原著的PDF,今天有空,转到BLOG上来。
第七章 布局
所有CSS布局技术都依赖于三个基本概念:定位、浮动和空白边操纵
7.1 让设计居中[code]
<body>
<div id='wrapper'>
</div>
</body>
/*最明了的居中方案,可惜IE6不支持*/
#wrapper{
  ......
我在www.c09.com 发表了这个笔记并上传了原著的PDF,今天有空,转到BLOG上来。
招数和过滤器
IE的有条件注释:仅用这一项,就可以解决IE的兼容问题,至于其它浏览器的不同版本,我们完全可以忽略不计。[code]
/*有条件注释仅在IE中支持且IE5以后的所有版本均支持*/
<!--[if IE]
<style type='text/css'>
@im ......
css
clearfix(针对火狐height:auto无效解决方案)
Firefox等符合W3C标准的浏览器中,如果有一个DIV作为外部容器,内部的DIV如果设置了float样式,则外部的容器DIV因为内部没有clear,导致不能被撑开。
例:
<div style=" border:2px solid #0CC; width:600px;" >
<div style="
wi ......
display Property Values
ValueDescription
none
The element will generate no box at all
block
The element will generate a block box (a line break before and after the element)
inline
The element will generate an inline box (no line break before or after the element). This is default
inline-blo ......