CardItem.sass 2.99 KB
/* pages/tab/learningCenter/components/CardItem/CardItem.wxss */
.item-container {
  position: relative;
  width: 100%;
  background-color: #fff;
  border-radius: 24rpx;
  overflow: hidden;
  font-size: 0;
  box-shadow: 0 4rpx 16rpx 0 #2a61eb1a;
}
.image-box {
  height: 180rpx;
  .item-img {
    width: 100%;
    height: 100%;
  }
  .image-tag {
    position: absolute;
    left: 0;
    top: 0;
    width: 94rpx;
    height: 48rpx;
  }
  .tag {
    position: absolute;
    top: 16rpx;
    right: 24rpx;
    width: 72rpx;
    height: 40rpx;
    border-radius: 4rpx;
    color: #FFFFFF;
    font-size: 24rpx;
    text-align: center;
    line-height: 40rpx;
    background: #00000059;
  }
}
.item-content {
  padding: 14rpx;
  .item-title {
    font-size: 30rpx;
    color: #292D33;
    font-weight: 500;
    margin-bottom: 8rpx;
    width: 307rpx;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .item {
    position: relative;
    display: flex;
    align-items: center;
    font-size: 24rpx;
    margin-bottom: 4rpx;
    &.transparent {
      opacity: 0;
    }
    .label {
      flex-shrink: 0;
      width: 96rpx;
      color: #999EA8;
      margin-right: 20rpx;
      &.custom {
        width: 144rpx;
      }
    }
    .value {
      color: #666666;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      .split {
        margin: 0 8rpx;
      }
      .green {
        color: #2CCA74;
      }
      .red {
        color: #EB4E4E;
      }
    }
  }
}
.dot-value {
  width: 12rpx;
  height: 12rpx;
  border-radius: 50%;
  background: #2CCA74;
  margin-right: 8rpx;
}

.green {
  color: #2CCA74;
}

.progress-box {
  width: 129rpx;
  height: 12rpx;
  background: linear-gradient(128.8deg, rgba(117, 188, 255, .35) 0%, rgba(44, 102, 247, .35) 100%);
  border-radius: 8rpx;
}

.progress-text {
  color: #3B73FF;
  font-size: 24rpx;
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(128.8deg, #75bcff 0%, #2c66f7 100%);
  border-radius: 8rpx;
}

.score-box {
  display: flex;
  align-items: center;
  .score-text {
    flex-shrink: 0;
    width: 40rpx;
    font-size: 28rpx;
    color: #666666;
    margin-left: 12rpx;
  }
}

.item-btn {
  margin-top: 8rpx;
  width: 307rpx;
  height: 56rpx;
  border-radius: 24rpx;
  background: #F1F7FE;
  font-size: 26rpx;
  color: #2C66F7;
  text-align: center;
  line-height: 56rpx;
  &.transparent {
    opacity: 0;
  }
}

.completed-bg {
  width: 112rpx;
  height: 112rpx;
  position: absolute;
  bottom: 16rpx;
  right: 16rpx;
}

.studied-box {
  display: flex;
  align-items: center;
  font-size: 24rpx;
  color: #999EA8;
  margin-top: 4rpx;
  .icon {
    flex-shrink: 0;
    width: 32rpx;
    height: 32rpx;
    margin-right: 8rpx;
  }
}
.transparent {
  opacity: 0;
}
.push-btn {
	height: 56rpx;
	margin: 10rpx 16rpx 24rpx 16rpx;
	border-radius: 24rpx;
	background: #f1f7fe;
	text-align: center;
	line-height: 56rpx;
	color: #2C66F7;
	font-size: 26rpx;
}