Files
repo/style.css
2025-03-04 23:48:47 +08:00

311 lines
5.1 KiB
CSS

/* 全局样式重置 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
background: #fff;
color: #333;
min-height: 100vh;
display: flex;
flex-direction: column;
}
/* 页眉样式 */
.header {
background: #1E90FF;
padding: 0.8rem 0;
position: fixed;
width: 100%;
top: 0;
z-index: 1000;
}
.header-content {
max-width: 1400px;
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 2rem;
}
.logo img {
height: 32px;
}
.nav-menu {
display: flex;
gap: 2rem;
align-items: center;
}
.nav-item {
color: white;
text-decoration: none;
font-size: 0.95rem;
position: relative;
}
.nav-item.active::after {
content: '';
position: absolute;
bottom: -5px;
left: 0;
width: 100%;
height: 2px;
background: white;
}
.user-menu {
display: flex;
align-items: center;
gap: 1.5rem;
}
.user-menu a {
color: white;
text-decoration: none;
}
/* 轮播图样式 */
.carousel-container {
margin-top: 60px;
width: 100%;
height: 400px;
overflow: hidden;
position: relative;
}
.carousel {
width: 100%;
height: 100%;
position: relative;
}
.carousel-items {
display: flex;
height: 100%;
transition: transform 0.5s ease-in-out;
}
.carousel-item {
flex: 0 0 100%;
height: 100%;
}
.carousel-item img {
width: 100%;
height: 100%;
object-fit: cover;
}
/* 分类导航样式 */
.categories {
max-width: 1400px;
margin: 2rem auto;
padding: 0 2rem;
display: flex;
justify-content: center;
gap: 1.5rem;
border-bottom: 1px solid #eee;
padding-bottom: 1rem;
}
.category-item {
padding: 0.5rem 1.5rem;
border-radius: 4px;
cursor: pointer;
transition: all 0.3s ease;
color: #666;
font-size: 0.9rem;
}
.category-item.active {
background: #1E90FF;
color: white;
}
/* 软件展示区样式 */
.software-grid {
max-width: 1400px;
margin: 0 auto;
padding: 2rem;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
gap: 2rem;
}
.software-card {
display: block;
text-decoration: none;
background: white;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
transition: all 0.3s ease;
cursor: pointer;
border: 1px solid #eee;
}
.software-card:hover {
transform: translateY(-5px);
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.software-image {
position: relative;
padding-top: 56.25%; /* 16:9 比例 */
}
.software-image img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
}
.software-info {
padding: 1.2rem;
}
.software-info h3 {
font-size: 1.1rem;
margin-bottom: 0.5rem;
color: #333;
}
.software-info p {
color: #666;
font-size: 0.85rem;
line-height: 1.5;
}
/* 添加标签样式 */
.software-tags {
display: flex;
gap: 0.5rem;
margin-top: 0.8rem;
}
.tag {
padding: 0.2rem 0.8rem;
background: #f5f7fa;
border-radius: 3px;
font-size: 0.75rem;
color: #666;
}
/* 页脚样式 */
.footer {
background: #2c3e50;
color: white;
padding: 2rem 0;
width: 100%;
margin-top: auto;
}
.footer-content {
max-width: 1200px;
margin: 0 auto;
text-align: center;
}
/* 修改main样式 */
main {
flex: 1;
padding-bottom: 2rem;
}
/* 下载记录按钮和悬浮窗样式 */
.download-history-container {
position: relative;
}
.download-history-btn {
background: none;
border: none;
color: white;
cursor: pointer;
display: flex;
align-items: center;
gap: 8px;
font-size: 0.95rem;
padding: 0.5rem 1rem;
}
.download-history-popup {
position: absolute;
top: 100%;
right: 0;
width: 300px;
background: white;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
margin-top: 10px;
display: none;
z-index: 1000;
}
.download-history-popup.active {
display: block;
}
.popup-header {
padding: 1rem;
border-bottom: 1px solid #eee;
}
.popup-header h3 {
color: #333;
font-size: 1rem;
margin: 0;
}
.popup-content {
max-height: 400px;
overflow-y: auto;
}
.history-list {
padding: 0.5rem 0;
}
.history-item {
padding: 0.8rem 1rem;
border-bottom: 1px solid #f5f5f5;
display: flex;
align-items: center;
gap: 1rem;
}
.history-item:last-child {
border-bottom: none;
}
.history-item-icon {
width: 40px;
height: 40px;
border-radius: 8px;
object-fit: cover;
}
.history-item-info {
flex: 1;
}
.history-item-name {
font-size: 0.9rem;
color: #333;
margin-bottom: 0.2rem;
}
.history-item-time {
font-size: 0.8rem;
color: #999;
}