index.html
<!DOCTYPE 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,我是 HTML5,我是 html5sdlkfjsdlkfjsldkfjlksdjflksdjflksdjflksdjflksdjflksdfjlksdfjlk,我是 HTML5,我是 html5,我是 HTML5,我是 html5,我是 HTML5,我是 html5,我是 HTML5,我是 html5,我是 HTML5,</p>
<!-- <a href="http://baidu.com">百度</a> -->
</body>
</html>
style.css
@charset "utf-8";
p {
font-size: 50px;
background: silver;
/*text-decoration: underline;*/
/*text-decoration: overline;*/
/*text-decoration: line-through;*/
/*text-decoration: blink;*/
/*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: pre-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文本样式精讲
本文详细介绍了使用CSS进行文本样式的设置方法,包括字体大小、背景颜色等基本属性,并展示了如何通过调整这些属性来改变HTML文本的显示效果。文中通过实际代码示例,解释了如何实现文本缩进、换行等高级特性。

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



