解决微信小程序首页空白问题。
This commit is contained in:
@@ -1,79 +0,0 @@
|
||||
|
||||
page {
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
.page {
|
||||
min-height: 100vh;
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
.content {
|
||||
padding-top: 0; /* 移除padding-top,因为tab页和内容区域都使用绝对定位 */
|
||||
margin-top: 0;
|
||||
position: relative;
|
||||
min-height: 100vh; /* 确保content有足够高度 */
|
||||
}
|
||||
|
||||
/* 隐藏导航栏占位区域,避免产生空白 */
|
||||
.uni-navbar__placeholder {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* 标签页 */
|
||||
.tabs {
|
||||
display: flex;
|
||||
background-color: #FFFFFF;
|
||||
border-bottom: 1px solid #E0E0E0;
|
||||
padding: 0 16rpx;
|
||||
margin-top: 0;
|
||||
position: absolute;
|
||||
top: 88rpx; /* 导航栏高度 */
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
.tab-item {
|
||||
padding: 24rpx 32rpx;
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.tab-item text {
|
||||
font-size: 30rpx;
|
||||
color: #666;
|
||||
}
|
||||
.tab-item.active text {
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
}
|
||||
.tab-item.active::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 32rpx;
|
||||
right: 32rpx;
|
||||
height: 4rpx;
|
||||
background-color: #007AFF;
|
||||
border-radius: 2rpx;
|
||||
}
|
||||
.champion-card {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 16rpx;
|
||||
padding: 32rpx;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 400rpx;
|
||||
}
|
||||
.champion-title {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.champion-desc {
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
Reference in New Issue
Block a user