index.less 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. @import '../../app.less';
  2. .select {
  3. position: relative;
  4. text-align: center;
  5. .mask {
  6. position: fixed;
  7. top: 0;
  8. left: 0;
  9. right: 0;
  10. bottom: 0;
  11. z-index: 1;
  12. }
  13. .select-warp {
  14. line-height: 30px;
  15. display: inline-block;
  16. position: relative;
  17. text-align: center;
  18. }
  19. .select-body {
  20. overflow: hidden;
  21. position: absolute;
  22. bottom: 0;
  23. left: 0;
  24. right: 0;
  25. background: #fff;
  26. border: 1px solid @line_color;
  27. border-radius: 4px;
  28. box-sizing: border-box;
  29. opacity: 0;
  30. z-index: 2;
  31. transform: translateY(100%);
  32. .select-option {
  33. height: 0;
  34. line-height: 25px;
  35. padding-left: 10px;
  36. border-bottom: 1px solid transparent;
  37. font-size: 12px;
  38. cursor: pointer;
  39. transition: all 0.3s;
  40. text-align: left;
  41. }
  42. .select-option:hover {
  43. background: @theme_bg_color;
  44. }
  45. .select-option:last-child {
  46. border-bottom: none;
  47. }
  48. }
  49. .select-body.select {
  50. opacity: 1;
  51. .select-option {
  52. height: auto;
  53. border-color: @line_color;
  54. }
  55. }
  56. .down-arrow {
  57. display: inline-block;
  58. position: relative;
  59. width: 16px;
  60. height: 16px;
  61. }
  62. .down-arrow::after {
  63. display: inline-block;
  64. content: " ";
  65. height: 8px;
  66. width: 8px;
  67. border-width: 2px 2px 0 0;
  68. border-color: #fff;
  69. border-style: solid;
  70. transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
  71. position: absolute;
  72. top: 50%;
  73. margin-top: -1px;
  74. }
  75. .up-arrow {
  76. display: inline-block;
  77. position: relative;
  78. width: 16px;
  79. height: 16px;
  80. }
  81. .up-arrow::after {
  82. display: inline-block;
  83. content: " ";
  84. height: 8px;
  85. width: 8px;
  86. border-width: 2px 2px 0 0;
  87. border-color: #fff;
  88. border-style: solid;
  89. transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
  90. position: absolute;
  91. top: 50%;
  92. margin-top: -1px;
  93. }
  94. &.white {
  95. cursor: pointer;
  96. .select-warp.active {
  97. background: rgba(241, 243, 246, 1);
  98. }
  99. .button {
  100. width: 98px;
  101. padding: 0px;
  102. border-radius: 0;
  103. background: none;
  104. color: #686872;
  105. line-height: 30px;
  106. }
  107. .up-arrow {
  108. display: none;
  109. }
  110. .down-arrow {
  111. display: none;
  112. }
  113. color: #686872;
  114. .select-body {
  115. border: none;
  116. }
  117. .select-option {
  118. padding: 0;
  119. text-align: center;
  120. line-height: 30px;
  121. border: none;
  122. }
  123. }
  124. .up-arrow::after {
  125. display: inline-block;
  126. content: " ";
  127. height: 8px;
  128. width: 8px;
  129. border-width: 2px 2px 0 0;
  130. border-color: #fff;
  131. border-style: solid;
  132. transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
  133. position: absolute;
  134. top: 50%;
  135. margin-top: -1px;
  136. }
  137. &.default {
  138. cursor: pointer;
  139. .select-warp.active {
  140. background: rgba(241, 243, 246, 1);
  141. }
  142. .button {
  143. line-height: 20px;
  144. }
  145. .up-arrow::after {
  146. width: auto;
  147. height: auto;
  148. border-width: 5px;
  149. border-color: transparent transparent #8897a8 transparent;
  150. border-style: solid;
  151. transform: translateY(-3px);
  152. }
  153. .down-arrow::after {
  154. width: auto;
  155. height: auto;
  156. border-width: 5px;
  157. border-color: #8897a8 transparent transparent transparent;
  158. border-style: solid;
  159. transform: translateY(3px);
  160. }
  161. .select-body {
  162. border: none;
  163. }
  164. .select-option {
  165. padding: 0;
  166. text-align: center;
  167. line-height: 30px;
  168. border: none;
  169. }
  170. }
  171. }