HTML 自适应订单号列表模板 - 每页 10 个,带分页功能
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<title>订单号列表</title>
<style>
body {
font-family: Arial, Helvetica, sans-serif;
background-color: #f2f2f2;
margin: 0;
padding: 0;
}
h1 {
text-align: center;
margin-top: 50px;
font-size: 36px;
color: #333;
}
table {
margin: 50px auto;
border-collapse: collapse;
width: 80%;
background-color: #fff;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}
th, td {
padding: 12px 15px;
text-align: center;
border: 1px solid #ddd;
}
th {
background-color: #333;
color: #fff;
font-size: 18px;
}
tr:nth-child(even) {
background-color: #f2f2f2;
}
.pagination {
display: flex;
justify-content: center;
margin: 50px auto;
align-items: center;
}
.pagination button {
background-color: #fff;
border: 1px solid #ddd;
color: #333;
padding: 10px 15px;
font-size: 16px;
margin: 0 10px;
cursor: pointer;
outline: none;
}
.pagination button.active {
background-color: #333;
color: #fff;
}
@media screen and (max-width: 768px) {
table {
width: 100%;
}
th, td {
padding: 8px;
font-size: 14px;
}
h1 {
font-size: 24px;
}
}
</style>
</head>
<body>
<h1>订单号列表</h1>
<table>
<thead>
<tr>
<th>订单号</th>
<th>金额</th>
<th>日期</th>
</tr>
</thead>
<tbody>
<tr>
<td>20210101001</td>
<td>100.00</td>
<td>2021-01-01</td>
</tr>
<tr>
<td>20210101002</td>
<td>50.00</td>
<td>2021-01-01</td>
</tr>
<tr>
<td>20210101003</td>
<td>80.00</td>
<td>2021-01-01</td>
</tr>
<tr>
<td>20210101004</td>
<td>120.00</td>
<td>2021-01-01</td>
</tr>
<tr>
<td>20210101005</td>
<td>70.00</td>
<td>2021-01-01</td>
</tr>
<tr>
<td>20210101006</td>
<td>90.00</td>
<td>2021-01-01</td>
</tr>
<tr>
<td>20210101007</td>
<td>60.00</td>
<td>2021-01-01</td>
</tr>
<tr>
<td>20210101008</td>
<td>150.00</td>
<td>2021-01-01</td>
</tr>
<tr>
<td>20210101009</td>
<td>200.00</td>
<td>2021-01-01</td>
</tr>
<tr>
<td>20210101010</td>
<td>180.00</td>
<td>2021-01-01</td>
</tr>
<tr>
<td>20210101011</td>
<td>160.00</td>
<td>2021-01-01</td>
</tr>
<tr>
<td>20210101012</td>
<td>300.00</td>
<td>2021-01-01</td>
</tr>
<tr>
<td>20210101013</td>
<td>250.00</td>
<td>2021-01-01</td>
</tr>
<tr>
<td>20210101014</td>
<td>220.00</td>
<td>2021-01-01</td>
</tr>
<tr>
<td>20210101015</td>
<td>280.00</td>
<td>2021-01-01</td>
</tr>
<tr>
<td>20210101016</td>
<td>150.00</td>
<td>2021-01-01</td>
</tr>
<tr>
<td>20210101017</td>
<td>130.00</td>
<td>2021-01-01</td>
</tr>
<tr>
<td>20210101018</td>
<td>90.00</td>
<td>2021-01-01</td>
</tr>
<tr>
<td>20210101019</td>
<td>70.00</td>
<td>2021-01-01</td>
</tr>
<tr>
<td>20210101020</td>
<td>120.00</td>
<td>2021-01-01</td>
</tr>
</tbody>
</table>
<div class='pagination'>
<button class='active'>1</button>
<button>2</button>
<button>3</button>
<button>4</button>
<button>5</button>
</div>
</body>
</html>
原文地址: https://www.cveoy.top/t/topic/l48p 著作权归作者所有。请勿转载和采集!