index.wxss 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. .wux-calendar {
  2. position: relative;
  3. background: #fff;
  4. height: 600rpx;
  5. width: 100%;
  6. overflow: hidden
  7. }
  8. .wux-calendar__content {
  9. position: relative;
  10. width: 100%;
  11. height: 100%;
  12. transition: transform .3s
  13. }
  14. .wux-calendar__bd {
  15. height: 100%;
  16. position: relative;
  17. overflow: hidden
  18. }
  19. .wux-calendar__hd {
  20. position: relative;
  21. width: 100%
  22. }
  23. .wux-calendar__hd::before {
  24. content: " ";
  25. position: absolute;
  26. left: 0;
  27. top: 0;
  28. right: 0;
  29. height: 1PX;
  30. border-top: 1PX solid #d9d9d9;
  31. color: #d9d9d9;
  32. transform-origin: 0 0;
  33. transform: scaleY(.5)
  34. }
  35. .wux-calendar__hd + .wux-calendar__bd {
  36. height: calc(97.8%)
  37. }
  38. .wux-calendar__toolbar {
  39. height: 2.2rem;
  40. display: flex;
  41. text-align: center
  42. }
  43. .wux-calendar__picker {
  44. display: flex;
  45. align-items: center;
  46. justify-content: space-between;
  47. width: 50%;
  48. max-width: 400rpx;
  49. flex-shrink: 10;
  50. display: block;
  51. line-height: 2.2rem
  52. }
  53. .wux-calendar__link {
  54. float: left;
  55. width: 25%;
  56. height: 2.2rem;
  57. line-height: 2rem;
  58. min-width: 72rpx
  59. }
  60. .wux-calendar__icon {
  61. display: inline-block;
  62. vertical-align: middle;
  63. background-size: 100% auto;
  64. background-position: center
  65. }
  66. .wux-calendar__icon--next,
  67. .wux-calendar__icon--prev {
  68. width: .75rem;
  69. height: .75rem
  70. }
  71. .wux-calendar__icon--next {
  72. background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23007aff'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")
  73. }
  74. .wux-calendar__icon--prev {
  75. background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23007aff'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")
  76. }
  77. .wux-calendar__value {
  78. flex-shrink: 1;
  79. position: relative;
  80. overflow: hidden;
  81. text-overflow: ellipsis;
  82. float: left;
  83. width: 50%;
  84. height: 2.2rem
  85. }
  86. .wux-calendar__weekdays {
  87. height: 36rpx;
  88. background: #f7f7f8;
  89. display: flex;
  90. font-size: 22rpx;
  91. box-sizing: border-box;
  92. position: relative
  93. }
  94. .wux-calendar__weekdays::after {
  95. content: " ";
  96. position: absolute;
  97. left: 0;
  98. bottom: 0;
  99. right: 0;
  100. height: 1PX;
  101. border-bottom: 1PX solid #d9d9d9;
  102. color: #d9d9d9;
  103. transform-origin: 0 100%;
  104. transform: scaleY(.5)
  105. }
  106. .wux-calendar__weekdays + .wux-calendar__months {
  107. height: calc(82%)
  108. }
  109. .wux-calendar__weekday {
  110. flex-shrink: 1;
  111. width: 14.28571429%;
  112. width: calc(14.28571429%);
  113. line-height: 34rpx;
  114. text-align: center
  115. }
  116. .wux-calendar__months {
  117. width: 100%;
  118. height: 100%;
  119. overflow: hidden;
  120. position: relative
  121. }
  122. .wux-calendar__months-content {
  123. width: 100%;
  124. height: 100%;
  125. display: flex;
  126. position: relative;
  127. -webkit-backface-visibility: hidden;
  128. transform: translate3d(0,0,0)
  129. }
  130. .wux-calendar__month {
  131. display: flex;
  132. flex-direction: column;
  133. width: 100%;
  134. height: 100%;
  135. position: absolute;
  136. left: 0;
  137. top: 0
  138. }
  139. .wux-calendar__days {
  140. height: 16.66666667%;
  141. height: calc(16.66666667%);
  142. display: flex;
  143. flex-shrink: 1;
  144. width: 100%;
  145. position: relative
  146. }
  147. .wux-calendar__days::after {
  148. content: " ";
  149. position: absolute;
  150. left: 0;
  151. bottom: 0;
  152. right: 0;
  153. height: 1PX;
  154. border-bottom: 1PX solid #d9d9d9;
  155. color: #d9d9d9;
  156. transform-origin: 0 100%;
  157. transform: scaleY(.5)
  158. }
  159. .wux-calendar__days:last-child::after {
  160. display: none
  161. }
  162. .wux-calendar__day {
  163. flex-shrink: 1;
  164. display: flex;
  165. justify-content: center;
  166. align-items: center;
  167. box-sizing: border-box;
  168. width: 14.28571429%;
  169. width: calc(14.28571429%);
  170. text-align: center;
  171. color: #3d4145;
  172. font-size: 30rpx;
  173. cursor: pointer
  174. }
  175. .wux-calendar__day--prev {
  176. color: #ccc
  177. }
  178. .wux-calendar__day--next {
  179. color: #ccc
  180. }
  181. .wux-calendar__day--disabled {
  182. color: #d4d4d4;
  183. cursor: auto
  184. }
  185. .wux-calendar__day--today .wux-calendar__text {
  186. background: #e3e3e3
  187. }
  188. .wux-calendar__day--selected .wux-calendar__text {
  189. background: #0894ec;
  190. color: #fff
  191. }
  192. .wux-calendar__text {
  193. display: inline-block;
  194. border-radius: 100%;
  195. width: 60rpx;
  196. height: 60rpx;
  197. line-height: 60rpx
  198. }