KunWeb/ciyon/web/css/kunban_activity.css

219 lines
4.6 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* 坤班活动页专属样式 */
/* 头部Banner */
.activity-banner {
height: 200px;
position: relative;
overflow: hidden;
margin-bottom: 40px;
background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url(images/activity-banner.jpg) center/cover no-repeat;
transition: background 0.3s ease;
}
body.night-mode .activity-banner {
background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), url(images/activity-banner-night.jpg) center/cover no-repeat;
}
.activity-banner-text {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
color: #fff;
z-index: 10;
}
.activity-banner-text h1 {
font-size: 28px;
margin-bottom: 8px;
letter-spacing: 1px;
}
.activity-banner-text p {
font-size: 16px;
opacity: 0.9;
}
/* 活动分类导航 */
.activity-nav {
background-color: #000;
border-radius: 4px;
margin-bottom: 30px;
overflow: hidden;
}
.activity-nav-list {
display: flex;
gap: 1px;
}
.activity-nav-item {
padding: 12px 24px;
background-color: #111;
color: #fff;
cursor: pointer;
transition: all 0.3s ease;
}
.activity-nav-item.active,
.activity-nav-item:hover {
background-color: #165DFF;
color: #fff;
}
body.night-mode .activity-nav {
background-color: #181a1f;
}
body.night-mode .activity-nav-item {
background-color: #2C3036;
color: #e5e6eb;
}
body.night-mode .activity-nav-item.active,
body.night-mode .activity-nav-item:hover {
background-color: #165DFF;
color: #fff;
}
/* 活动列表 */
.activity-list {
margin-bottom: 60px;
}
.activity-item {
display: grid;
grid-template-columns: 200px 1fr;
gap: 20px;
background: #fff;
border-radius: 8px;
box-shadow: 0 2px 12px rgba(22,93,255,0.08);
padding: 20px;
margin-bottom: 20px;
transition: all 0.3s ease;
}
body.night-mode .activity-item {
background-color: #2C3036;
box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.activity-item:hover {
transform: translateY(-3px);
box-shadow: 0 4px 16px rgba(22,93,255,0.12);
}
body.night-mode .activity-item:hover {
box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
.activity-img {
width: 100%;
height: 350px;
border-radius: 4px;
overflow: hidden;
background-color: #F2F3F5;
display: flex;
align-items: center;
justify-content: center;
color: #86909C;
}
body.night-mode .activity-img {
background-color: #373B41;
color: #C0C4CC;
}
.activity-img img {
width: 100%;
height: 100%;
object-fit: cover;
}
.activity-info{
padding-bottom: 20px;
}
.activity-info h3 {
font-size: 18px;
color: #000;
margin-bottom: 8px;
}
body.night-mode .activity-info h3 {
color: #fff;
}
.activity-info p {
font-size: 14px;
color: #4E5969;
line-height: 1.7;
}
body.night-mode .activity-info p {
color: #E5E6EB;
}
/* 分页导航 - 重点修改.kun-page-link样式 */
.pagination {
text-align: right;
margin-bottom: 40px;
}
/* 核心:.kun-page-link 样式 */
.kun-page-link {
display: inline-block;
padding: 8px 16px;
margin: 0 4px; /* 缩小间距更紧凑 */
border-radius: 4px;
background: #fff;
color: #4E5969;
border: none;
cursor: pointer;
transition: all 0.3s ease;
font-size: 14px;
text-decoration: none; /* 去掉a标签默认下划线 */
}
/* 夜间模式下的kun-page-link */
body.night-mode .kun-page-link {
background-color: #2C3036;
color: #E5E6EB;
}
/* 禁用状态 */
.kun-page-link.disabled {
opacity: 0.5;
cursor: not-allowed;
pointer-events: none; /* 禁用点击 */
}
/* 激活状态(当前页) */
.kun-page-link.active {
background-color: #165DFF;
color: #fff;
}
/* 悬浮状态(非禁用/非激活) */
.kun-page-link:hover:not(.disabled):not(.active) {
background-color: #165DFF;
color: #fff;
}
/* 保留分页中的span样式省略号 */
.pagination span {
display: inline-block;
padding: 8px 8px;
margin: 0 4px;
color: #4E5969;
font-size: 14px;
}
body.night-mode .pagination span {
color: #E5E6EB;
}
/* 移动端适配 */
@media (max-width: 768px) {
.activity-banner {
height: 150px;
}
.activity-banner-text h1 {
font-size: 22px;
}
.activity-nav-list {
flex-wrap: wrap;
}
.activity-nav-item {
flex: 1;
text-align: center;
padding: 10px;
}
.activity-item {
grid-template-columns: 1fr;
}
.activity-img {
height: 120px;
}
.pagination {
text-align: center;
}
/* 移动端分页链接适配 */
.kun-page-link {
padding: 6px 12px;
font-size: 13px;
}
}