#小技巧
文字两边对齐1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style>
div{
border:1px solid;
font-size:20x;
}
span{
border:1px solid red;
display: inline-block;
text-align:justify;
width:100px;
line-height: 20px;
overflow: hidden;
height: 20px;
}
span:after{
content:" ";
display: inline-block;
width:100%;
border:1px solid blue;
}
</style>
</head>
<body>
<div>
<span>姓名</span><br>
<span>联系方式</span>
</div>
</body>
</html>
1 | <!DOCTYPE html> |