time.component.scss 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. .week-days {
  2. display: flex;
  3. justify-content: space-between;
  4. padding: 10px 0;
  5. }
  6. .week-day {
  7. flex: 1;
  8. text-align: center;
  9. font-weight: bold;
  10. }
  11. .days {
  12. display: flex;
  13. flex-wrap: wrap;
  14. padding: 10px;
  15. }
  16. .curday, .lastday {
  17. font-size: 12px;
  18. width: calc(100% / 7); /* 每行7个 */
  19. height: 43px; /* 每个日期的高度 */
  20. width: 14.28%;
  21. display: flex;
  22. flex-direction: column; /* 垂直排列 */
  23. align-items: center;
  24. justify-content: flex-end; /* 向下对齐 */
  25. cursor: pointer;
  26. position: relative; /* 使 dot 可以绝对定位 */
  27. border-radius: 50%;
  28. }
  29. .dot {
  30. width: 20px; /* 圆点的直径 */
  31. height: 20px; /* 圆点的直径 */
  32. background-color: blue; /* 圆点的颜色 */
  33. border-radius: 50%; /* 圆形 */
  34. top: 0; /* 在顶部 */
  35. transform: translateY(-50%); /* 向上移动圆点,使其居中 */
  36. }
  37. // .curday {
  38. // // background-color: #f0f0f0;
  39. // }
  40. .lastday {
  41. // background-color: #e0e0e0;
  42. color: #ccc;
  43. }
  44. .selected {
  45. border: 1px solid blue; /* 选中日期的背景色 */
  46. color: rgb(0, 132, 255); /* 选中日期的字体颜色 */
  47. }
  48. .daka{
  49. background-color: #a4e17e;
  50. }