<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
/*
color: #FF0000; 字体颜色
font-size: 36px; 大小
font-weight: bold; 是否加粗
font-style: italic; 是否倾斜
font-family: '微软雅黑'; 字体样式
line-height 行高
font: 字体是否加粗 字体大小/行高 字体样式
text-indent: 36px; 设置文字首行缩进
text-align:设置文件对齐位置
*/
ul li {
/* color: #FF0000;
font-size: 36px;
font-weight: bold;
font-style: italic;
font-family: '微软雅黑';
line-height: 100px; */
/* font: 字体是否加粗 字体大小/行高 字体样式 */
font: bold 24px/50px "microsoft yahei";
color: aqua;
}
p {
text-indent: 36px;
}
.box2{
width: 300px;
height: 200px;
background: yellowgreen;
text-align: center;
line-height: 200px;
}
</style>
</head>
<body>
<div class="box">
<ul>
<li>111</li>
<li>222</li>
<li>333</li>
<li>444</li>
<li>5555</li>
</ul>
<p>
CSS:层叠样式表(英文全称:Cascading Style
Sheets)是一种用来表现[HTML](https://baike.baidu.com/item/HTML)或[XML](https://baike.baidu.com/item/XML)(标准通用标记语言的一个子集)等文件样式的计算机语言。CSS不仅可以静态地修饰网页,还可以配合各种脚本语言动态地对网页各元素进行格式化,CSS
能够对网页中元素位置的排版进行像素级精确控制,支持几乎所有的字体字号样式,拥有对网页对象和模型样式编辑的能力
</p>
<div class="box2">
python
</div>
</div>
</body>
</html>
6、css文本样式的设置
于 2023-07-14 16:32:55 首次发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)