index.html
<!DOTTYPE html>
<html lang ="zh-cn">
<head>
<meta charset="utf-8">
<title>CSS文本样式[下]</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<p>我是 html5</p>
<p>我是HTML5</p>
<a href="http://www.baidu.com">百度</a>
</body>
</html>
style.css
@charset "utf-8";
p{
font-size:50px;
background:silver;
text-decoration:underline;
text-decoration:overline;
text-decoration:lint-through;
text-transform:uppercase;
text-transform:lowercase;
text-transform:capitalize;
text-shadow:5px 5px 3px red;
text-align:left;
text-align:right;
text-align:center;
text-align:justify;
text-align:start;
text-align:end;
white-space:nowrap;
white-space:pre;
white-space:pri-line;
white-space:pre-wrap;
letter-spacing:5px;
word-spacing:15px;
line-height:1.5;
word-wrap:break-word;
text-indent:50px;
}
a{
text-decoration:none;
}
笔记:
二:CSS文本样式三种
文本装饰,英文大小写,转换和文本阴影
1.text-decoration(各种划线)
2.text-transform(英文文本转换为大小写)
3.text-shadow(给文本添加阴影,其中四个值,分别是:水平便宜,垂直偏移,阴影模糊度(可选),阴影颜色(可选)
三:样式控制
1:text-align(指定文本的对齐方式)
2:white-space(处理空白排版方式)
3:letter-spacing(字母之间的间距)
4:word-space(单词间距)
5:line-height(设置行高)
6:word-wrap(让过长的英文单词断开)
7:text-indent(设置文本首行的缩进)
截图: