
CSS 手册常用
font 常用属性:
color:设置字体颜色 颜色的表达方式:#000000(取值范围:00-ff)rgb(100,14,200)(取值整数
或是百分数) 颜色的英语单词(用颜色名称指定 COLOR 不被一些浏览器接受)。
color:123456;color:rgb(100,14,200);
font-famliy: Courier, "Courier New", monospace 什么是(opentype)
font-size:单位为像素,或是百分比,normal(12px);lem=12px;区别 em 和 px
font-style:italic : 斜体。对于没有斜体变量的特殊字体,将应用 oblique
oblique : 倾斜的字体 (Italic 是使用文字的斜体,Oblique 是让没有斜体属性的文字倾斜!)
font-weight:bold bolder lighter
text-decoration:none, blink underline line-through overline
text-shadow: 0px 0px 20px yellow, 0px 0px 10px orange, red 5px -5px; (在火狐中有效果)
opacity 不可为负值
text-transform : none | capitalize | uppercase | lowercase
line-height : normal | length
letter-spacing : normal | length 检索或设置对象中的文字(字母)之间的间隔。
text 属性
text-indent : length (首行缩进 可为负值)
text-align : left | right | center | justify(两端对齐)
writing-mode : lr-tb | tb-rl
direction : ltr | rtl | inherit
word-break : normal | break-all | keep-all
word-wrap : normal | break-word (设置或检索当当前行超过指定容器的边界时是否断行。 )
background 属性:
background-color : transparent | color
background-image : none | url (url)
background-position : position || position top | center | bottom | left | center | right
如果只指定了一个值,该值将用于横坐标。纵坐标将默认为 50%。第二个值将用于纵坐标。默
认值为:(0% 0%)。
background-positionX : length | left | center | right
background-positionY : length | top | center | bottom
background-repeat : repeat | no-repeat | repeat-x | repeat-y
repeat : 背景图像在纵向和横向上平铺
no-repeat : 背景图像不平铺
repeat-x : 背景图像在横向上平铺
repeat-y : 背景图像在纵向平铺
布局:layout