countdown-box.vue 974 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <template>
  2. <view class="countdown-box">
  3. <view class="hour">23</view> <text>:</text> <view class="minute">59</view> <text>:</text>
  4. <view class="second">59</view> <text>后结束</text>
  5. </view>
  6. </template>
  7. <script></script>
  8. <style lang="scss" scoped>
  9. .flex-center-box {
  10. display: flex;
  11. justify-content: center;
  12. align-items: center;
  13. }
  14. .countdown-box {
  15. @extend .flex-center-box;
  16. .hour,
  17. .minute,
  18. .second {
  19. text-align: center;
  20. align-items: center;
  21. width: 48rpx;
  22. height: 48rpx;
  23. background: #ff457b;
  24. border-radius: 50%;
  25. color: #fff;
  26. font-size: 26rpx;
  27. line-height: 48rpx;
  28. }
  29. text {
  30. margin: 0 8rpx;
  31. font-size: 30rpx;
  32. color: #ff457b;
  33. font-size: 26rpx;
  34. &:last-child {
  35. margin-right: 0;
  36. margin-left: 16rpx;
  37. color: #333333;
  38. font-size: 30rpx;
  39. }
  40. }
  41. }
  42. </style>