<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dashboard with Table</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
box-sizing: border-box;
background-color: #f0f2f5;
}
.dashboard {
max-width: 1000px;
margin: 50px auto;
padding: 20px;
background-color: white;
border-radius: 8px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}
table, th, td {
border: 1px solid #ddd;
}
th, td {
padding: 12px;
text-align: left;
}
th {
background-color: #007bff;
color: white;
}
td {
background-color: #f9f9f9;
}
tr:nth-child(even) td {
background-color: #f2f2f2;
}
</style>
</head>
<body>
<div class="dashboard">
<h1>Dashboard</h1>
<p>Welcome to your dashboard. Below is the table with some sample data.</p>
<table>
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Email</th>
<th>Role</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>John Doe</td>
<td>[email protected]</td>
<td>Administrator</td>
</tr>
<tr>
<td>2</td>
<td>Jane Smith</td>
<td>[email protected]</td>
<td>Editor</td>
</tr>
<tr>
<td>3</td>
<td>Emily Johnson</td>
<td>[email protected]</td>
<td>Subscriber</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
标签:表格,color,padding,background,table,带有,td,border,仪表板
From: https://blog.51cto.com/u_16213142/11999135