Files

114 lines
1.7 KiB
CSS

/* 导航栏以及body样式 */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
box-sizing: border-box;
}
header {
background-color: #333;
color: white;
padding: 10px 0;
text-align: right;
}
header nav ul {
list-style: none;
margin: 0;
padding: 0;
}
header nav ul li {
display: inline;
margin-right: 20px;
}
header nav ul li a {
color: white;
text-decoration: none;
}
main {
padding: 20px;
}
/* Footer 样式 */
.footer-container {
background-color: #333;
color: white;
padding: 20px 0;
display: flex;
justify-content: center;
align-items: center;
}
.footer-item {
margin: 0 20px;
}
.footer-item a {
color: white;
text-decoration: none;
font-weight: bold;
}
.footer-item a:hover {
color: #ddd;
}
/* 内容列表样式 */
#content-list {
margin-top: 20px;
}
.content-item {
border: 1px solid #ccc;
padding: 10px;
margin-bottom: 10px;
background-color: #f9f9f9;
display: flex;
justify-content: space-between;
align-items: center;
}
.content-item ul{
list-style-type: none;
}
.content-item ul li{
line-height: 2;
}
/*sidebar样式 */
.container {
display: flex;
}
.sidebar {
width: 250px;
background-color: #333;
color: white;
padding: 15px;
box-sizing: border-box;
height: 100vh;
position: fixed;
}
#content-list {
margin-left: 270px; /* 确保内容不会被侧边栏覆盖 */
padding: 20px;
box-sizing: border-box;
width: calc(100% - 270px);
}
.sidebar ul li a{
color: white;
}
.sidebar ul li {
padding: 10px;
text-align: left;
margin-bottom: 10px; /* 增加底部间距 */
}