模板:IndexV27/Welcome/style.css
来自EaseCation Wiki
更多操作
.wel-container {
display: flex;
gap: 10px;
width: 100%;
box-sizing: border-box;
margin-top: 10px;
height: auto;
align-items: stretch;
}
/* 左侧整张卡片作为轮播Banner */
.wel-2 {
background-color: rgba(72, 255, 0, 0.1);
backdrop-filter: blur(10px);
flex: 1;
border-radius: 10px;
padding: 0;
box-sizing: border-box;
border: 1px solid rgba(0, 0, 0, 0.05);
overflow: hidden;
position: relative;
min-height: 240px;
}
.banner-carousel {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
overflow: hidden;
}
.banner-item {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
opacity: 0;
transition: opacity 0.6s ease-in-out;
}
.banner-item.active {
opacity: 1;
}
/* 强制覆盖MediaWiki图片默认样式,非常关键 */
.banner-item a.image {
display: block !important;
width: 100% !important;
height: 100% !important;
margin: 0 !important;
padding: 0 !important;
border: none !important;
}
.banner-item a.image img.thumbimage {
width:100% !important;
height:100% !important;
object-fit: cover !important;
display:block !important;
margin:0 !important;
padding:0 !important;
border:none !important;
}
/* 轮播圆点指示器 */
.banner-dots {
position: absolute;
bottom: 10px;
left: 0;
width: 100%;
display: flex;
justify-content: center;
gap: 8px;
z-index: 10;
}
.banner-dots .dot {
width: 11px;
height: 11px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.4);
cursor: pointer;
}
.banner-dots .dot.active {
background: #ffffff;
}
/* 右侧欢迎卡片 */
.wel-1 {
background-color: rgba(250, 254, 0, 0.1);
backdrop-filter: blur(10px);
flex: 1;
border-radius: 10px;
padding: 15px;
box-sizing: border-box;
border: 1px solid rgba(0, 0, 0, 0.05);
display: flex;
flex-direction: column;
}
.wel-title {
font-weight: bold;
margin-bottom: 10px;
font-size: 1.2em;
}
.wel-text {
font-size: 15px;
}
/* 导航网格 */
.nav-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 8px;
margin-top: 14px;
}
.nav-card {
aspect-ratio: 16 / 6;
border-radius: 8px;
overflow: hidden;
position: relative;
}
.nav-card__background a.image {
display:block;
width:100%;
height:100%;
margin:0;
padding:0;
}
.nav-card__background img.thumbimage {
width:100%;
height:100%;
object-fit: cover;
display:block;
margin:0;
padding:0;
}
.nav-card__foreground {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
padding: 6px 8px;
background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
color: #fff;
font-weight: bold;
text-align: center;
}
/* 移动端 */
@media (max-width: 768px) {
.wel-container {
flex-direction: column;
height: auto;
}
.wel-1,
.wel-2 {
min-height: 200px;
}
.wel-title {
font-weight: bold;
margin-bottom: 10px;
font-size: 16px;
}
.nav-grid {
grid-template-columns: repeat(2, 1fr);
}
}