CSS学习笔记

CSS学习笔记,记录自己平常常用并且容易忘记的一些内容,便于查阅. 不过没有整理,条理比较乱,

选择器
ID选择器 #id
类选择器 .class
子选择器 .class ul>li
邻近同胞 h2+p
属性选择器 img[title] 如:input[type= “input”],input[type=”text”]
     
伪类/伪元素:
:hover  鼠标进入样式
:active  点击样式
:visited
:focus 当前焦点样式
:first-letter 首字母样式
:first-line 首行样式
:before {content : xxx } 在前面加上某东西
:after
:first-child
 
使IE6能支持新特性的脚本
CSSHOVER www.xs4all.nl/~peterned/csshover.html
找 Edwards的支持新特性的JS脚本:http://dean.edwards.name/IE7/overview/
 
格式化文本:
字体serif 和 sans-serif
Serif:对于长段落文本是最好的字体: Times,Times New Roman,Georgia
Sans-serif:干净而简洁 Arial,Helvetica,Verdana,Formata
字体常用组合:
font-family:
    Arial,,Helvetica,sans-serif
    "Times New Roman”,Times,serif
    "Courier New”,Courier,monospace
    Verdana,Arial,Helvetica,snas-serif
    Geneva,Arial,Helvetica,sans-serif
    Tahoma,”Lucida Grande”,Arial,sans-serif
    "Lucida Console ”,Monaco,monospace
    "Marker Felt”,"Comic Sans MS ”,fantasy
    "Century Gothic”,"Gill Sans”,Arial,sans-serif
font-style:italic
font-weight:normal | bold
text-transform:uppercase|lowercase|none 大小写
font-variant:small-caps; 小型大写
font: normal 12px/1.2em Verdana;
text-decoration:underline overline line-through blink none; 装饰
letter-spacing
word-spacing
line-height:1.5
text-align:center
text-indent:2em 首行缩进
list-style-type:square upper-alpha disc none
list-style-position:outside inside
list-style-image:url();
 
border-collapse : separate | collapse 
border-spacing:
border-style:solid dotted dashed double groove ridge inset outset none hidden
border-width:0px 0px 0px 0px
margin:0px 0px 0px 0px 顺序为顺时针 上右下左
padding:1px 2px 3px 4px
display: inline | block
border:1px solid black;
overflow:visible scroll auto hidden控制溢出文本
float:left right none
clear:left right both none
white-space: nowrap pre normal 代替

 
background-attachment
background-position
background-repeat
 
min-width
min-height
max-width
max-height
 
 
用js驱动产生条纹式表格
http://www.alistapart.com/articles/zebratables
 
CSS布局模板
http://blog.html.it/layoutgala
http://www.mollio.org
http://www.oswd.org (Open Source Web Design)

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值