Files
toutoukan_front/miniprogram/pages/home/home.wxss

308 lines
4.7 KiB
Plaintext
Raw Normal View History

2025-09-27 17:24:52 +08:00
::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
}
/* 滚动容器样式 */
.scroll-container {
width: 100%;
height: 100vh;
box-sizing: border-box;
2025-08-09 17:41:14 +08:00
padding: 20rpx;
2025-09-27 17:24:52 +08:00
padding-bottom: 13vh;
2025-08-09 17:41:14 +08:00
}
2025-09-27 17:24:52 +08:00
/* 卡片容器样式 */
2025-09-23 19:10:14 +08:00
.cards-container {
2025-08-09 17:41:14 +08:00
display: flex;
2025-09-27 17:24:52 +08:00
flex-direction: column;
gap: 20rpx;
2025-08-09 17:41:14 +08:00
}
2025-09-27 17:24:52 +08:00
/* 投票卡片基础样式 */
2025-08-09 17:41:14 +08:00
.voting-card {
2025-09-27 17:24:52 +08:00
background-color: #fff;
border-radius: 24rpx;
padding: 24rpx;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
2025-08-09 17:41:14 +08:00
}
/* 卡片头部样式 */
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
2025-09-27 17:24:52 +08:00
margin-bottom: 20rpx;
2025-08-09 17:41:14 +08:00
}
.user-info {
display: flex;
align-items: center;
2025-09-27 17:24:52 +08:00
gap: 16rpx;
2025-08-09 17:41:14 +08:00
}
.avatar {
2025-09-27 17:24:52 +08:00
width: 56rpx;
height: 56rpx;
2025-08-09 17:41:14 +08:00
border-radius: 50%;
2025-09-27 17:24:52 +08:00
}
.user-details {
display: flex;
flex-direction: column;
gap: 4rpx;
2025-08-09 17:41:14 +08:00
}
.username {
2025-09-27 17:24:52 +08:00
font-size: 24rpx;
font-weight: 500;
color: #333;
2025-08-09 17:41:14 +08:00
}
.user-status {
2025-09-27 17:24:52 +08:00
font-size: 20rpx;
color: #666;
2025-08-09 17:41:14 +08:00
}
.vote-status {
2025-09-27 17:24:52 +08:00
font-size: 22rpx;
padding: 6rpx 16rpx;
2025-08-09 17:41:14 +08:00
border-radius: 20rpx;
2025-09-27 17:24:52 +08:00
background-color: #f5f5f5;
color: #666;
2025-08-09 17:41:14 +08:00
}
2025-09-27 17:24:52 +08:00
.vote-status:empty {
display: none;
}
/* 分割线样式 */
2025-08-09 17:41:14 +08:00
.divider {
2025-09-27 17:24:52 +08:00
width: 100%;
2025-08-09 17:41:14 +08:00
height: 2rpx;
background-color: #f5f5f5;
2025-09-27 17:24:52 +08:00
margin-bottom: 24rpx;
2025-08-09 17:41:14 +08:00
}
2025-09-27 17:24:52 +08:00
/* 标题区域样式 */
2025-08-09 17:41:14 +08:00
.vote-title-section {
2025-09-27 17:24:52 +08:00
margin-bottom: 24rpx;
2025-08-09 17:41:14 +08:00
}
.vote-title {
2025-09-27 17:24:52 +08:00
font-size: 28rpx;
font-weight: 600;
color: #333;
line-height: 40rpx;
}
.voted-tip {
color: #51bdb6;
font-size: 24rpx;
margin-left: 10rpx;
font-weight: 500;
2025-08-09 17:41:14 +08:00
}
.vote-desc {
2025-09-27 17:24:52 +08:00
font-size: 22rpx;
color: #666;
margin-top: 8rpx;
line-height: 32rpx;
2025-08-09 17:41:14 +08:00
}
2025-09-27 17:24:52 +08:00
/* 选项容器样式 */
2025-08-09 17:41:14 +08:00
.options-container {
2025-09-27 17:24:52 +08:00
display: flex;
flex-direction: column;
gap: 16rpx;
margin-bottom: 28rpx;
2025-08-09 17:41:14 +08:00
}
2025-09-27 17:24:52 +08:00
/* 选项项样式 */
2025-08-09 17:41:14 +08:00
.option-item {
2025-09-27 17:24:52 +08:00
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx;
border: 2rpx solid #eee;
2025-08-09 17:41:14 +08:00
border-radius: 16rpx;
2025-09-27 17:24:52 +08:00
position: relative;
transition: all 0.2s;
2025-08-09 17:41:14 +08:00
}
2025-09-27 17:24:52 +08:00
.option-item.selected {
border-color: #409EFF;
background-color: rgba(64, 158, 255, 0.05);
2025-08-09 17:41:14 +08:00
}
2025-09-27 17:24:52 +08:00
.option-item.voted-option {
border-color: #51bdb6;
background-color: rgba(46, 125, 50, 0.05);
}
2025-08-09 17:41:14 +08:00
2025-09-27 17:24:52 +08:00
.option-item.disabled-option {
opacity: 0.8;
pointer-events: none;
}
/* 选项信息样式 */
2025-08-09 17:41:14 +08:00
.option-info {
display: flex;
align-items: center;
2025-09-27 17:24:52 +08:00
gap: 16rpx;
flex: 1;
2025-08-09 17:41:14 +08:00
}
.option-icon {
2025-09-27 17:24:52 +08:00
width: 40rpx;
height: 40rpx;
border-radius: 50%;
background-color: #f5f5f5;
2025-08-09 17:41:14 +08:00
display: flex;
align-items: center;
2025-09-27 17:24:52 +08:00
justify-content: center;
font-size: 24rpx;
color: #666;
2025-08-09 17:41:14 +08:00
}
2025-09-27 17:24:52 +08:00
.option-item.voted-option .option-icon {
background-color: rgba(46, 125, 50, 0.1);
color: #51bdb6;
2025-08-09 17:41:14 +08:00
}
2025-09-27 17:24:52 +08:00
.option-details {
display: flex;
flex-direction: column;
gap: 4rpx;
2025-08-09 17:41:14 +08:00
}
2025-09-27 17:24:52 +08:00
.option-name {
font-size: 24rpx;
color: #333;
font-weight: 500;
2025-08-09 17:41:14 +08:00
}
2025-09-27 17:24:52 +08:00
.your-selection {
color: #51bdb6;
font-size: 22rpx;
margin-left: 10rpx;
2025-08-09 17:41:14 +08:00
}
2025-09-27 17:24:52 +08:00
.option-desc {
font-size: 20rpx;
color: #999;
2025-08-09 17:41:14 +08:00
}
2025-09-27 17:24:52 +08:00
/* 选项操作按钮样式 */
.option-action-btn {
font-size: 20rpx;
color: #666;
padding: 4rpx 12rpx;
border: 2rpx solid #eee;
border-radius: 8rpx;
margin-right: 16rpx;
2025-08-09 17:41:14 +08:00
}
2025-09-27 17:24:52 +08:00
/* 选项百分比样式 */
2025-08-09 17:41:14 +08:00
.option-percent {
2025-09-27 17:24:52 +08:00
font-size: 22rpx;
color: #666;
margin-right: 16rpx;
min-width: 60rpx;
text-align: right;
2025-08-09 17:41:14 +08:00
}
/* 进度条样式 */
.progress-bar {
2025-09-27 17:24:52 +08:00
width: 160rpx;
height: 8rpx;
background-color: #f5f5f5;
border-radius: 4rpx;
2025-08-09 17:41:14 +08:00
overflow: hidden;
}
.progress-value {
height: 100%;
2025-09-27 17:24:52 +08:00
background-color: #409EFF;
transition: width 0.3s;
}
.option-item.voted-option .progress-value {
background-color: #51bdb6;
2025-08-09 17:41:14 +08:00
}
2025-09-27 17:24:52 +08:00
/* 选中指示器样式 */
2025-08-09 17:41:14 +08:00
.vote-indicator {
position: absolute;
2025-09-27 17:24:52 +08:00
right: 20rpx;
top: 50%;
transform: translateY(-50%);
font-size: 32rpx;
color: #409EFF;
2025-08-09 17:41:14 +08:00
display: none;
}
.vote-indicator.show {
display: block;
}
2025-09-27 17:24:52 +08:00
.option-item.voted-option .vote-indicator {
color: #51bdb6;
}
/* 统计信息样式 */
2025-08-09 17:41:14 +08:00
.vote-stats {
display: flex;
justify-content: space-between;
2025-09-27 17:24:52 +08:00
font-size: 20rpx;
color: #999;
margin-bottom: 28rpx;
2025-08-09 17:41:14 +08:00
}
2025-09-27 17:24:52 +08:00
/* 投票按钮样式 */
2025-08-09 17:41:14 +08:00
.vote-btn {
2025-09-27 17:24:52 +08:00
width: 100%;
height: 80rpx;
background-color: #51bdb6;
color: #fff;
border-radius: 40rpx;
font-size: 24rpx;
font-weight: 500;
2025-08-09 17:41:14 +08:00
display: flex;
align-items: center;
2025-09-27 17:24:52 +08:00
justify-content: center;
gap: 12rpx;
2025-08-09 17:41:14 +08:00
}
.vote-btn::after {
border: none;
}
2025-09-27 17:24:52 +08:00
.vote-btn.vote-btn-disabled {
background-color: #E0E0E0 !important;
color: #9E9E9E !important;
border-color: #E0E0E0 !important;
2025-08-09 17:41:14 +08:00
}
2025-09-27 17:24:52 +08:00
.btn-text {
font-size: 24rpx;
2025-08-09 17:41:14 +08:00
}
2025-09-27 17:24:52 +08:00
/* 图标字体基础样式需确保项目已引入iconfont */
.iconfont {
font-family: "iconfont" !important;
font-size: inherit;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
2025-09-27 17:24:52 +08:00
.icon-thumbs-up:before {
content: "\e60a";
}
2025-09-27 17:24:52 +08:00
.icon-check-circle:before {
content: "\e610";
}