css div 画表格
发布网友
发布时间:2022-04-20 19:49
我来回答
共1个回答
热心网友
时间:2022-04-20 21:18
参考代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
table {
border-collapse: collapse;
}
table, tr, td, th {
border: 4px solid black;
}
th, td {
width: 200px;
height: 50px;
text-align: center;
}
</style>
</head>
<body>
<table>
<tr style="height: 100px;">
<td colspan="3">
<span style="display: block;padding: 10px;border: 3px solid black;width: 500px;font-size: 23px;margin: auto;font-weight: bold;">扫码文本框</span>
</td>
<td><span style="display: block;width: 70px;margin: auto;">加载历史入库信息</span></td>
</tr>
<tr>
<th>产品名称</th>
<th>装箱数量</th>
<th>箱数<span style="font-size: 10px;">(默认1箱)</span></th>
<th>1</th>
</tr>
<tr>
<td>A</td>
<td>100</td>
<td>1</td>
<td>2</td>
</tr>
<tr>
<td>B</td>
<td>100</td>
<td>1</td>
<td rowspan="4"></td>
</tr>
<tr>
<td>A</td>
<td>100</td>
<td>1</td>
</tr>
<tr>
<td>合计:</td>
<td>300</td>
<td>3</td>
</tr>
<tr>
<td colspan="3"><span style="display: block;padding: 5px;border: 3px solid black;width: 500px;font-size: 20px;margin: auto;font-weight: bold;">确认</span></td>
</tr>
</table>
</body>
</html>
效果如下图:
追问谢谢了 我是想用div 不过也是要谢谢你
追答div也是可以实现的