多语言展示
当前在线:368今日阅读:84今日分享:32

DIV+CSS教程:[6]CSS文字颜色与粗细设置

网页中颜色的运用是网页必不可少的。文字的各种颜色使用使得网页的页面五彩缤纷。而文字粗细也是网页设计常用的。
工具/原料

dreamweaver

方法/步骤
1

html页面颜色采用RGB格式,而颜色表示可以通过以下3种方法,十六进制,英文单词,RGB模式。而英文单词代表颜色的不多,RGB颜色值在实际使用时定,可以使用Photoshop(简称PS)拾取工具进行获取获得。

2

CSS是通过color属性来控制颜色的,如color:rgb(80%,0%,80%)、color:#000、color:blue。

4

CSS通过 font-weight属性进行文字粗细设置。属性值有:normal(默认值),bold(定义粗体字符),bolder(定义更粗的字符),lighter(定义更细的字符),定义由粗到细的字符100至900.

5

样式设置:span{ font-size:26px; }span.one{ font-weight:100; }span.two{ font-weight:bolder; }span.three{ font-weight:300; }span.four{ font-weight:lighter; }span.five{ font-weight:500; }span.six{ font-weight:lighter; }span.seven{ font-weight:700; }span.eight{ font-weight:normal; }span.nine{ font-weight:900; }span.ten{ font-weight:bold; }html设置: 文字粗细:100 文字粗细:bolder 文字粗细:300 文字粗细:lighter 文字粗细:500 文字粗细:lighter 文字粗细:700 文字粗细:normal 文字粗细:900 文字粗细:bold

推荐信息