CSS文本属性
1.color 设置文本颜色
2.letter-spacing 字符间距
3.text-decoration
属性值: (1)none
没有下划线
(2)underline
下划线
(3)overline
上划线
(4)line-through
中划线
4.word-spacing 单词间距(系统默认两个字组成叫单词)
练习:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CSS文本</title>
<style type="text/css">
body{
color:#F00;
letter-spacing:10px;
text-decoration:line-through ;
word-spacing:10px ;
}
</style>
</head>
<body>
今天 天气 不错!
</body>
</html>
效果:
CSS字体属性
1.font-family 字体类型(默认为宋体)
2.font-size 设置字体的大小
3.font-style 设置字体样式 (属性:normal:正体 italic:斜体) 注:默认为正体
4.font-weight 给字体设置粗细 (属性:bold 给字体适当加粗)
字体属性可简写为:
font:字体的样式(normal/italic) 字体的粗细(bold) 字体的大小(font-size) 字体的类型(font-family)
练习:
本文介绍了CSS中用于控制文本外观的重要属性,包括文本颜色、字符间距、文本修饰及单词间距等,并详细讲解了字体属性如字体家族、大小、样式和粗细的使用方法。
1407

被折叠的 条评论
为什么被折叠?



