学习css中的摘录
链接方法:
外部链接样表:<head><link rel="stylesheet" type="text/css" href="*.css"></head>
内部的:1:<head><style type="text/css"> example css </style></head>
2:<p style="color: sienna; margin-left: 20px">
使用方法:
类选择器:.center {text-align: center}
<h1 class="center">
This heading will be center-aligned
</h1>
id选择器:#center {text-align: center}
<h1 id="center">
This heading will be center-aligned
</h1>
派生:
基于大类的使用,只要更大的元素内部的表格单元: .fancy td
类名为 fancy 的表格单元: td.fancy <td class="fancy">
background-position 的默认值是 0% 0%,在功能上相当于 top left。
background-attachment:fixed:图像固定不动
body
{
background-image:url(/i/eg_bg_02.gif);
background-repeat:no-repeat;
background-attachment:fixed
}
background
简写属性,作用是将背景属性设置在一个声明中。
background-attachment
背景图像是否固定或者随着页面的其余部分滚动。
background-c
相关文档:
<!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=gbk" />
<title>www.zishu.cn</t ......
转载自:div+css优点
http://blog.sina.com.cn/s/blog_4fe1e5e90100bdtk.html
最近面试了多家公司...有个关于div+css布局好处的问题,问了好多次..我回答了一些,但是不太全面..
今天从网上系统的搜索到了一些,参考
DIV本身就是容器性质的,你不但可以内嵌table还可以内嵌文本和其它的HTML代码;CSS是CascADIng style Sh ......
1.在页面HEAD中引入一个特殊的CSS
<link rel="stylesheet" type="text/css" href="${contextPath}/styles/print.css" media="print" />
2.在print.css中通过将页面中显示的区域DISPLAY设置为NONE,打印区域设定DISPLAY为BLOCK
另外可以加入一个特殊的CSS来控制分页效果
. ......
1.div的垂直居中问题
vertical-align:middle; 将行距增加到和整个DIV一样高 line-height:200px; 然
后插入文字,就垂直居中了。缺点是要控制内容不要换行
2. margin加倍的问题
设置为float的div在ie下设置的margin会加倍。这是一个ie6都存在的bug。解决方
案是在这个div里面加上display:inline;
例如:
<#div ......
png透明 AlphaImageLoader
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=bEnabled,sizingMethod=sSize,src=sURL)
enabled:可选项。布尔值(Boolean)。设置或检索滤镜是否激活。true:默认值。滤镜激活。false:滤镜被禁止。
sizingMethod:可选项。字符串(String)。设置或检索滤镜作用的对象的图 ......