-
Notifications
You must be signed in to change notification settings - Fork 0
/
css9.html
108 lines (108 loc) · 2.28 KB
/
css9.html
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title> css table</title>
</head>
<style>
table.a {border-collapse:collapse;} /* 显示一个表的放边框 */
table,th,td
{
border:1px solid black;
} /* 表格边框 */
table.b {width:100%}; /* 表格宽度 */
th.b {height:50px;} /* 表格高度 */
td.b {text-align:right;} /* 表格文字水平对齐 */
td.c {vertical-align:bottom;height:50px;} /* 表格文字垂直对齐 */
td.d {padding:15px;} /* 表格填充 */
th.f {background:green;color:white;}/* 表格颜色 */
caption {caption-side:bottom;}
</style>
<body>
<table>
<tr>
<th>firstname</th>
<th>lastname</th>
</tr>
<tr>
<td>liu</td>
<td>conky</td>
</tr>
<tr>
<td>yang</td>
<td>xiuling</td>
</tr>
</table>
<table class="a">
<tr>
<th>firstname</th>
<th>lastname</th>
</tr>
<tr>
<td>liu</td>
<td>conky</td>
</tr>
<tr>
<td>yang</td>
<td>xiuling</td>
</tr>
</table>
<table class="b">
<caption>Table 1.1 Customers </caption>
<tr>
<th class="b">firstname</th>
<th class="b">lastname</th>
</tr>
<tr>
<td class="b">liu</td>
<td class="b">conky</td>
</tr>
<tr>
<td class="b">yang</td>
<td class="b">xiuling</td>
</tr>
</table>
<table>
<tr>
<th>firstname</th>
<th>lastname</th>
</tr>
<tr>
<td class="c">liu</td>
<td class="c">conky</td>
</tr>
<tr>
<td class="c">yang</td>
<td class="c">xiuling</td>
</tr>
</table>
<table>
<tr>
<th>firstname</th>
<th>lastname</th>
</tr>
<tr>
<td class="d">liu</td>
<td class="d">conky</td>
</tr>
<tr>
<td class="d">yang</td>
<td class="d">xiuling</td>
</tr>
</table>
<table>
<tr>
<th class="f">firstname</th>
<th class="f">lastname</th>
</tr>
<tr>
<td class="c">liu</td>
<td class="c">conky</td>
</tr>
<tr>
<td class="c">yang</td>
<td class="c">xiuling</td>
</tr>
</table>
</body>
</html>