文字属性


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>03-文字属性</title>
<style>
p{
font-style: italic;
font-weight: bold;
font-size: 10px;
font-family:"楷体";
}
</style>
</head>
<body>
<!--
1.规定文字样式的属性
格式:font-style: italic;
取值:
normal : 正常的, 默认就是正常的
italic : 倾斜的
快捷键:
fs font-style: italic;
fsn font-style: normal;

2.规定文字粗细的属性
格式: font-weight: bold;
单词取值:
bold 加粗
bolder 比加粗还要粗
lighter 细线, 默认就是细线
数字取值:
100-900之间整百的数字

快捷键
fw font-weight:;
fwb font-weight: bold;
fwbr font-weight: bolder;

3.规定文字大小的属性
格式:font-size: 30px;
单位:px(像素 pixel)
注意点: 通过font-size设置大小一定要带单位, 也就是一定要写px
快捷键
fz font-size:;
fz30 font-size: 30px;

4.规定文字字体的属性
格式:font-family:"楷体";
注意点:
1.如果取值是中文, 需要用双引号或者单引号括起来
2.设置的字体必须是用户电脑里面已经安装的字体
快捷键
ff font-family:;

-->
<i>我是文字</i>
<b>我是文字</b>
<p>abc我是段落</p>
</body>
</html>

posted on 2017-03-28 08:23  时间断了  阅读(191)  评论(0)    收藏  举报

导航