如何使文本在表格单元格的底部开始?



我想让下面的文本显示在这个单元格/表的底部:

b.vertical {
writing-mode: vertical-lr;
transform: rotate(-180deg);
}
<!DOCTYPE html>
<html>
<title>W3.CSS Template</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<head>
</head>
<body>
<table class="w3-table w3-border" >
<th width="10%" class="w3-medium w3-border w3-green w3-center"><b class="vertical">Customer</b></th>
<th width="10%" class="w3-medium w3-border w3-green w3-center"><b class="vertical">Order Date</b></th>
<th width="10%" class="w3-medium w3-border w3-green w3-center"><b class="vertical">INV No</b></th>
<th width="10%" class="w3-medium w3-border w3-green w3-center"><b class="vertical">PO Number</b></th>       
<th width="10%" class="w3-medium w3-border w3-green w3-center"><b class="vertical">Pale Ale Draught Style 355ml Can 5.0% ABV x 12</b></th>
</tr>
</thead>
<tbody>

</body>
</html>

usevertical-align:bottom

b.vertical {
writing-mode: vertical-lr;
transform: rotate(-180deg);
}
table.w3-table th {
vertical-align:bottom;
}
<!DOCTYPE html>
<html>
<title>W3.CSS Template</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<head>
</head>
<body>
<table class="w3-table w3-border">
<tr>
<th width="10%" class="w3-medium w3-border w3-green w3-center"><b class="vertical">Customer</b></th>
<th width="10%" class="w3-medium w3-border w3-green w3-center"><b class="vertical">Order Date</b></th>
<th width="10%" class="w3-medium w3-border w3-green w3-center"><b class="vertical">INV No</b></th>
<th width="10%" class="w3-medium w3-border w3-green w3-center"><b class="vertical">PO Number</b></th>
<th width="10%" class="w3-medium w3-border w3-green w3-center"><b class="vertical">Pale Ale Draught Style 355ml Can 5.0% ABV x 12</b></th>
</tr>
</thead>
<tbody>

</body>
</html>

最新更新