1.背景属性(background)
- 色彩 {background-color: #FFFFFF;}
- 图片 {background-image: url();}
- 重复 {background-repeat: no-repeat;}
- 滚动 {background-attachment: fixed;}(固定) scroll;(滚动)
- 位置 {background-position: left;}(水平) top(垂直);
2.字体属性(font)
- 大小 {font-size: x-large;}(特大) xx-small;(极小)
- 样式 {font-style: oblique;}(偏斜体) italic;(斜体) normal;(正常)
- 行高 {line-height: normal;}(正常) 单位:PX、PD、EM
- 粗细 {font-weight: bold;}(粗体) lighter;(细体) normal;(正常)
- 变体 {font-variant: small-caps;}(小型大写字母) normal;(正常)
- 大小写 {text-transform: capitalize;}(首字母大写) uppercase;(大写) lowercase;(小写) none;(无)
- 修饰 {text-decoration: underline;}(下划线) overline;(上划线) line-through;(删除线) blink;(闪烁)
- 常用字体: (font-family)
文字属性
- color : #999999; /文字颜色/
- font-family : 宋体,sans-serif; /文字字体/
- font-size : 9pt; /文字大小/
- font-style:itelic; /文字斜体/
- font-variant:small-caps; /小字体/
- letter-spacing : 1pt; /字间距离/
- line-height : 200%; /设置行高/
- font-weight:bold; /文字粗体/
- vertical-align:sub; /下标字/
- vertical-align:super; /上标字/
- text-decoration:line-through; /加删除线/
- text-decoration: overline; /加顶线/
- text-decoration:underline; /加下划线/
- text-decoration:none; /删除链接下划线/
- text-transform : capitalize; /首字大写
- text-transform : uppercase; /英文大写/
- text-transform : lowercase; /英文小写/
- text-align:right; /文字右对齐/
- text-align:left; /文字左对齐/
- text-align:center; /文字居中对齐/
- text-align:justify; /文字分散对齐/
vertical-align属性
- vertical-align:top; /垂直向上对齐/
- vertical-align:bottom; /垂直向下对齐/
- vertical-align:middle; /垂直居中对齐/
- vertical-align:text-top; /文字垂直向上对齐/
- vertical-align:text-bottom; /文字垂直向下对齐/
符号属性
- list-style-type:none; /不编号/
- list-style-type:decimal; /阿拉伯数字/
- list-style-type:lower-roman; /小写罗马数字/
- list-style-type:upper-roman; /大写罗马数字/
- list-style-type:lower-alpha; /小写英文字母/
- list-style-type:upper-alpha; /大写英文字母/
- list-style-type:disc; /实心圆形符号/
- list-style-type:circle; /空心圆形符号/
- list-style-type:square; /实心方形符号/
- list-style-image:url(/dot.gif); /图片式符号/
- list-style-position: outside; /凸排/
- list-style-position:inside; /缩进/
css布局九决,学css不再难简单的几句CCS布局口诀,就可以写出精简,标准的样式。
一、IE边框若显若无,须注意,定是高度设置已忘记;
二、浮动产生有缘故,若要父层包含住,紧跟浮动要清除,容器自然显其中;
三、三像素文本慢移不必慌,高度设置帮你忙;
四、兼容各个浏览须注意,默认设置行高可能是隐患;
五、独立清除浮动须铭记,行高设无,高设零,设计效果兼浏览
六、学布局须思路,路随布局原理自然直,轻松驾驭html,流水布局少hack,代码清爽,兼容好,友好引擎喜欢迎。
七、所有标签皆有源,只是默认各不同,span是无极,无极生两仪—内联和块级,img较特殊,但也遵法理,其他只是改造各不同,一个*号全归原,层叠样式理须多练习,万物皆规律。
八、图片链接排版须小心,图片链接文字链接若对齐,padding和vertical-align:middle要设定,虽差微细倒无妨。
九、IE浮动双边距,请用display:inline拘。