You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

285 lines
5.7 KiB

.index {
min-height: 100vh;
background-color: #f0f2f5; // 整体背景色
/* 自定义导航栏样式 */
.custom-nav {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 100;
background: linear-gradient(to bottom, #6dd5ed, #2193b0);
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.05);
display: flex;
align-items: center;
justify-content: flex-start;
color: #fff;
.nav-container {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
.nav-title {
font-size: 36rpx;
font-weight: normal;
color: #333;
}
}
.community{
display: flex;
align-items: center;
justify-content: flex-start;
.icon{
width: 30rpx;
height: 30rpx;
}
.community-name {
font-size: 25rpx;
}
}
}
.main-content {
padding: 0 30rpx;
.search-bar {
display: flex;
align-items: center;
background-color: #fff;
border-radius: 40rpx;
padding: 16rpx 30rpx;
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.08);
margin: 20rpx 0;
.search-input {
border: none;
background: transparent;
font-size: 28rpx;
margin-left: 16rpx;
flex: 1;
}
}
.top-banner {
position: relative;
height: 400rpx; // 顶部背景高度
border-radius: 20rpx;
overflow: hidden;
margin-bottom: 30rpx;
background: linear-gradient(to bottom, #6dd5ed, #2193b0); // 渐变背景
.top-bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
z-index: 0;
}
.top-text {
position: absolute;
bottom: 60rpx;
left: 60rpx;
z-index: 1;
color: #fff;
text-align: left;
.main-title {
font-size: 48rpx;
font-weight: bold;
margin-bottom: 16rpx;
}
.sub-title {
font-size: 28rpx;
opacity: 0.9;
}
}
}
.feature-icons {
display: flex;
justify-content: space-around;
background-color: #fff;
padding: 40rpx 0;
margin-top: -80rpx; // 向上偏移,覆盖部分背景
margin-left: 10rpx;
margin-right: 10rpx;
border-radius: 20rpx;
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.08);
position: relative;
z-index: 2;
.icon-item {
display: flex;
flex-direction: column;
align-items: center;
padding: 20rpx;
border-radius: 16rpx;
transition: all 0.3s ease;
cursor: pointer;
&:active {
transform: scale(0.95);
background-color: #f0f8ff;
}
.icon-img {
width: 80rpx;
height: 80rpx;
margin-bottom: 16rpx;
}
.icon-text {
font-size: 20rpx;
color: #333;
}
}
}
.ad-section {
margin: 30rpx 0;
border-radius: 20rpx;
overflow: hidden;
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.08);
.ad-img {
width: 100%;
height: 360rpx; // 广告图高度
display: block;
object-fit: cover;
}
}
.swiper-container {
height: 300rpx; // 轮播图高度
margin: 30rpx 0;
border-radius: 20rpx;
overflow: hidden;
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.08);
.swiper-img {
width: 100%;
height: 300rpx;
display: block;
object-fit: cover;
}
}
.survey-vote {
display: flex;
margin: 30rpx 0;
background-color: #fff;
border-radius: 20rpx;
overflow: hidden;
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.08);
.item {
flex: 1;
display: flex;
align-items: center;
&:first-child {
border-right: 2rpx solid #eee;
}
.item-img {
width: 100%;
height: 200rpx;
}
.item-text {
display: flex;
flex-direction: column;
.title {
font-size: 32rpx;
font-weight: bold;
color: #333;
margin-bottom: 8rpx;
}
.desc {
font-size: 24rpx;
color: #999;
}
}
}
}
.announcement-section {
margin: 30rpx 0;
background-color: #fff;
border-radius: 20rpx;
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.08);
padding: 40rpx;
.announcement-header {
display: flex;
align-items: center;
margin-bottom: 30rpx;
.announcement-icon {
width: 40rpx;
height: 40rpx;
margin-right: 16rpx;
}
.announcement-title {
font-size: 36rpx;
font-weight: bold;
color: #333;
flex: 1;
text-align: left;
}
.more-text {
font-size: 28rpx;
color: #666;
}
}
.announcement-list {
.announcement-item {
padding: 24rpx 0;
border-bottom: 2rpx solid #eee;
text-align: left;
&:last-child {
border-bottom: none;
}
.item-title {
font-size: 28rpx;
color: #333;
margin-bottom: 12rpx;
line-height: 1.4;
}
.item-info {
display: flex;
align-items: center;
font-size: 24rpx;
color: #999;
.time-icon {
width: 28rpx;
height: 28rpx;
margin-right: 12rpx;
}
}
}
}
}
}
}