字体样式
字体font-family;
字体大小font-size,常用单位为px,百分比;
字体颜色color,有RGB、HEX、name的命名方式;
字体粗细font-weight,normal、bold、bolder、lighter、inherit、100~900;
字体样式font-style,normal、italic(斜体)、oblique(倾斜)
英文字体大小写 text-transform,capitalize(首字母大写)、uppercase(全部字母大写)、lowercase(全部小写)
文字修饰text-decoration,设置下划线、顶划线、删除线、闪烁等。
段落样式
字间距letter-sapcing
段落首字下沉float
段落首行缩进text-indent
段落水平对齐text-align
无序列表
<ul>
<li><span class="font">[新闻]</span>10万年薪招募球赛解说</li>
</ul>
无序列表样式list-style-type:disc(实心圆)、circle(空心圆)、square(实心方块)、none(不用任何项目符号)
有序列表
<ol> </ol>
还可以使用图片作为列表样式
定义列表
<dl>
<dt>definition term</dt>
<dd>definition description</dd>
</dl>
背景样式
背景颜色background-color
背景图像background-image
背景图像重复方式background-repeat
背景图像位置background-position: length | percentage | top | center | bottom | left | right
固定背景图像background-attachment: scroll | fixed
图片样式
border-style: none | hidden |dotted | dashed | solid | double | groove | ridge | inset | outset
border-top-style:
定义图片上边框样式
border-right-style:
定义图片右边框样式
border-bottom-style:
定义图片下边框样式
border-left-style:
定义图片左边框样式
border-color:
颜色
border-width:
宽度
图片对齐
水平对齐:
#pic1{
width:730px;
margin:0px auto 20 px auto;
padding:10px;
border:dashed 1px #9FA0A4
text-align:left; <!-- center/right -->
}
垂直对齐
vertical-align:baseline | sub | super | top | text-top | middle | bottom | text-bottom | length;
超链接样式
<a></a>
超链接有伪类等概念,也就是超链接有四种状态:没有访问前、鼠标移至对象上、单击超链接、已经访问后。
a:link a:hover a:active a:visited