preamble html标签,美化Index of /目录列表页面
时间: 2024-02-16 12:04:24 浏览: 23
您可以在Index of /页面的HTML代码中添加以下preamble标签来美化页面:
```
<!DOCTYPE html>
<html>
<head>
<title>Index of /</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f5f5f5;
margin: 0;
padding: 0;
}
h1 {
font-size: 2em;
margin: 0;
padding: 1em;
background-color: #333;
color: #fff;
text-align: center;
}
table {
margin: 0 auto;
border-collapse: collapse;
width: 80%;
background-color: #fff;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
th, td {
padding: 0.5em;
text-align: left;
border-bottom: 1px solid #ddd;
}
th {
background-color: #333;
color: #fff;
}
a {
text-decoration: none;
color: #333;
}
a:hover {
color: #000;
}
</style>
</head>
<body>
<h1>Index of /</h1>
<table>
<thead>
<tr>
<th>Name</th>
<th>Last modified</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<!-- 文件列表 -->
</tbody>
</table>
</body>
</html>
```
这个preamble标签将添加一个简单的CSS样式表,用于美化Index of /页面。它将设置背景颜色、字体等,使页面看起来更加美观和易于查看。同时,它还将创建一个简单的表格布局,以显示文件列表。您可以在<!-- 文件列表 -->处添加实际的文件列表。