用html写一个云笔记列表界面,第一行显示这是我的笔记,添加新笔记按钮,返回首页按钮。第二行显示ID,标题,创建时间,修改时间,操作,这些数据读取于一个静态字典。操作下有修改按钮,删除按钮。
时间: 2024-06-01 14:10:18 浏览: 20
<!DOCTYPE html>
<html>
<head>
<title>云笔记列表</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
h1 {
background-color: #f2f2f2;
padding: 20px;
margin: 0;
}
table {
border-collapse: collapse;
width: 100%;
}
th, td {
text-align: left;
padding: 8px;
border-bottom: 1px solid #ddd;
}
th {
background-color: #f2f2f2;
}
button {
background-color: #4CAF50;
color: white;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
}
button:hover {
background-color: #3e8e41;
}
.edit {
background-color: #008CBA;
}
.delete {
background-color: #f44336;
}
.edit, .delete {
color: white;
padding: 5px 10px;
border: none;
border-radius: 5px;
cursor: pointer;
margin-right: 5px;
}
.edit:hover, .delete:hover {
opacity: 0.8;
}
</style>
</head>
<body>
<h1>这是我的笔记</h1>
<button>添加新笔记</button>
<button>返回首页</button>
<table>
<thead>
<tr>
<th>ID</th>
<th>标题</th>
<th>创建时间</th>
<th>修改时间</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>HTML 笔记</td>
<td>2021-01-01 10:00:00</td>
<td>2021-01-02 11:30:00</td>
<td>
<button class="edit">修改</button>
<button class="delete">删除</button>
</td>
</tr>
<tr>
<td>2</td>
<td>CSS 笔记</td>
<td>2021-01-02 12:00:00</td>
<td>2021-01-03 13:30:00</td>
<td>
<button class="edit">修改</button>
<button class="delete">删除</button>
</td>
</tr>
<tr>
<td>3</td>
<td>JavaScript 笔记</td>
<td>2021-01-03 14:00:00</td>
<td>2021-01-04 15:30:00</td>
<td>
<button class="edit">修改</button>
<button class="delete">删除</button>
</td>
</tr>
</tbody>
</table>
</body>
</html>