<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
.test {
color: green;
width: 120px;
text-align: justify;
}
.test::after {
content: "";
display: inline-block;
width: 100%;
}
</style>
</head>
<body>
<div class="test">空空</div>
<div class="test">空空空空</div>
<div class="test">空空空空空</div>
<div class="test">空空空</div>
</body>
</html>
css实现文字在一个矩形框内均匀分布
最新推荐文章于 2024-01-18 14:47:02 发布