<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>文本样式</title>
<style>
/* 字体的样式 */
h1{font-style: normal;
/* 指定宽 */
width:100%;
/* 设置对齐方式 */
text-align: left ;
/* 给h1一个边框 颜色加样式加大小 */
border:red dashed 8px;
/* 边框同上 */
outline:rgb(154, 233, 123) dashed 8px;
}
/* 对h2文本的缩进 */
h2{
text-indent: 50px;
}
</style>
</head>
<body>
<h2>helloworld,helloworld,helloworld</h2><br>
<h1>helloworld,helloworld,helloworld</h1>
</body>
</html>
CSS之——04文本样式2020.3.9
最新推荐文章于 2020-11-12 16:05:42 发布