<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>文本样式</title>
<style type="text/css">
.box1{
width:500px;
height:200px;
background-color:red;
color:#420377;
text-decoration:underline;
/*设置鼠标的形状*/
cursor: pointer;
/*设置首行缩进*/
text-indent: 20px;
font-size:25px;
/*justify实现两端对齐*/
text-align: justify;
text-shadow: 0px 0px 1px #ffffff;
/*行高*/
/*当行高=盒子的高度时,那么会实现文本垂直方向居中*/
line-height: 200px;
text-align:center;
}
</style>
</head>
<body>
<div class="box1">
my name is star
</div>
<a href="">天空飘过五个字</a>
</body>
</html>