Files
youlegames/codes/minipro/calculation/miniprogram/pages/index/index.wxss

263 lines
4.4 KiB
Plaintext

/**index.wxss**/
page {
height: 100vh;
display: flex;
flex-direction: column;
background-color: #f5f6fa;
}
.scrollarea {
flex: 1;
}
.container {
padding: 0;
display: flex;
flex-direction: column;
}
/* 顶部背景区 */
.header-bg {
width: 100%;
height: 380rpx;
background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
border-bottom-left-radius: 48rpx;
border-bottom-right-radius: 48rpx;
padding: 40rpx;
box-sizing: border-box;
display: flex;
justify-content: center;
box-shadow: 0 12rpx 32rpx rgba(108, 92, 231, 0.25);
position: relative;
overflow: hidden;
}
.header-bg::after {
content: '';
position: absolute;
top: -80rpx;
right: -60rpx;
width: 240rpx;
height: 240rpx;
border-radius: 50%;
background: rgba(255,255,255,0.08);
pointer-events: none; /* Prevent blocking clicks */
}
.header-content {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 20rpx;
height: 140rpx;
position: relative; /* Ensure z-index works */
z-index: 2; /* Ensure it is above the background decoration */
}
.text-area {
display: flex;
flex-direction: column;
justify-content: center;
}
.greeting {
color: rgba(255, 255, 255, 0.85);
font-size: 26rpx;
margin-bottom: 10rpx;
font-weight: 500;
}
.nickname {
color: #ffffff;
font-size: 44rpx;
font-weight: 700;
letter-spacing: 2rpx;
}
.avatar-wrapper {
padding: 4rpx;
background: rgba(255, 255, 255, 0.25);
border-radius: 50%;
}
.avatar {
width: 110rpx;
height: 110rpx;
border-radius: 50%;
background-color: #fff;
border: 3rpx solid #ffffff;
}
/* 主要内容区 */
.main-content {
flex: 1;
width: 100%;
padding: 0 28rpx;
box-sizing: border-box;
margin-top: -80rpx;
z-index: 10;
padding-bottom: 60rpx;
}
.section-title {
font-size: 32rpx;
font-weight: 700;
color: #2d3436;
margin-left: 10rpx;
margin-bottom: 20rpx;
display: none;
}
/* 卡片列表 */
.grid-container {
display: flex;
flex-direction: column;
gap: 20rpx;
}
/* 单个卡片 */
.grid-item {
background-color: #ffffff;
border-radius: 28rpx;
padding: 32rpx;
display: flex;
align-items: center;
box-shadow: 0 8rpx 32rpx rgba(108, 92, 231, 0.08);
}
.grid-item-hover {
transform: scale(0.97);
background-color: #f8f7ff;
}
.icon-box {
width: 96rpx;
height: 96rpx;
border-radius: 24rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 28rpx;
flex-shrink: 0;
}
.icon {
font-size: 46rpx;
}
.bg-gradient-blue {
background: linear-gradient(135deg, #e0e6ff 0%, #c7d2fe 100%);
}
.bg-gradient-pink {
background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
}
.bg-gradient-green {
background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}
.bg-gradient-orange {
background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
}
.bg-gradient-purple {
background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
}
.text-box {
display: flex;
flex-direction: column;
flex: 1;
min-width: 0;
}
.label {
font-size: 32rpx;
color: #2d3436;
font-weight: 700;
margin-bottom: 6rpx;
}
.sub-label {
font-size: 23rpx;
color: #b2bec3;
font-weight: 500;
}
/* Banner */
.banner {
margin-top: 30rpx;
background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
border-radius: 28rpx;
padding: 28rpx 36rpx;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 12rpx 32rpx rgba(108, 92, 231, 0.3);
}
.banner-text {
display: flex;
flex-direction: column;
}
.banner-title {
color: #fff;
font-weight: 700;
font-size: 30rpx;
margin-bottom: 8rpx;
}
.banner-desc {
color: rgba(255,255,255,0.8);
font-size: 24rpx;
}
.banner-icon {
font-size: 40rpx;
}
/* 箭头 */
.arrow-icon {
margin-left: auto;
font-size: 40rpx;
color: #ddd;
font-weight: 300;
flex-shrink: 0;
padding-left: 12rpx;
}
/* 功能亮点区 */
.feature-highlights {
margin-top: 24rpx;
background: #ffffff;
border-radius: 28rpx;
padding: 32rpx 36rpx;
box-shadow: 0 8rpx 32rpx rgba(108, 92, 231, 0.08);
}
.highlight-title {
font-size: 28rpx;
font-weight: 700;
color: #2d3436;
margin-bottom: 20rpx;
letter-spacing: 1rpx;
}
.highlight-list {
display: flex;
flex-direction: column;
gap: 18rpx;
}
.highlight-item {
display: flex;
align-items: center;
gap: 14rpx;
font-size: 25rpx;
color: #636e72;
font-weight: 500;
}
.highlight-dot {
font-size: 14rpx;
color: #6c5ce7;
}