随意控制字的大小
-
font-size:
26pt
[***pt/***em/xx-small>>>>x-small>>>>small>>medium>>>large>>>x-large>>>xx-large
]
相对大小smaller >>larger>>
300%
背景颜色
background:
yellow;[rgb(51,204,0)R代表红色,G代表绿色,B代表蓝色
/color:
#333399 /aqua,
black,
blue,
fuchsia,
gray,
green,
lime,maroon,
navy,
olive,
purple,
red,
silver,
teal,
white,
and
yellow.]
字体选择(靠前的字体具有优先权)
font-family:
helvetica,
impact,
sans-serif;
字的颜色
color:
green
字体的正斜
font-style: italic [
Oblique/ normal]
字体的加粗
font-weight:
bold [100,,,,400,,,900,bolder,lighter]
控制字母的大小写
字体参数1(font-variant)正常文字缩小一半尺寸后大写
H2 {
font-variant: small-caps }
字母参数2
text-transform: uppercase [uppercase
使所有字母大写显示,
lowercase使所有字母小写显示,capitalize
使每个单词的第1个字母大写显示,
none 使所有继承的文字变形参数被忽略,文字将以正常形式显示。]
字体加线text-decoration:
underline
[underline 给文字下划线,
overline给文字上划线,
line-through给文字划出删除线,
blink是你在恶梦中常常看到的文字在闪烁,none使得上述效果都不会发生。]
去掉超连接的产生的下划线
A:link { text-decoration: none }
A:active { text-decoration: none }
A:visited { text-decoration: none }
|