mobileSelect.css 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. .mobileSelect {
  2. position: relative;
  3. z-index: 0;
  4. opacity: 0;
  5. visibility: hidden;
  6. -webkit-transition: opacity 0.4s, z-index 0.4s;
  7. transition: opacity 0.4s, z-index 0.4s;
  8. }
  9. .mobileSelect * {
  10. margin: 0;
  11. padding: 0;
  12. -webkit-box-sizing: border-box;
  13. box-sizing: border-box;
  14. }
  15. .mobileSelect .grayLayer {
  16. position: fixed;
  17. top: 0;
  18. left: 0;
  19. bottom: 0;
  20. right: 0;
  21. background: #eee;
  22. background: rgba(0, 0, 0, 0.7);
  23. z-index: 888;
  24. display: block;
  25. }
  26. .mobileSelect .content {
  27. width: 100%;
  28. display: block;
  29. position: fixed;
  30. z-index: 889;
  31. color: black;
  32. -webkit-transition: all 0.4s;
  33. transition: all 0.4s;
  34. bottom: -350px;
  35. left: 0;
  36. background: white;
  37. /* border-top-right-radius: 20px; */
  38. /* border-top-left-radius: 20px; */
  39. }
  40. .mobileSelect .content .fixWidth {
  41. width: 90%;
  42. margin: 0 auto;
  43. position: relative;
  44. }
  45. .mobileSelect .content .fixWidth:after {
  46. content: ".";
  47. display: block;
  48. height: 0;
  49. clear: both;
  50. visibility: hidden;
  51. }
  52. .mobileSelect .content .btnBar {
  53. /*border-bottom: 1px solid #DCDCDC;*/
  54. font-size: 15px;
  55. height: 45px;
  56. position: relative;
  57. text-align: center;
  58. line-height: 45px;
  59. }
  60. .mobileSelect .content .btnBar .cancel,
  61. .mobileSelect .content .btnBar .ensure {
  62. height: 45px;
  63. width: 55px;
  64. cursor: pointer;
  65. position: absolute;
  66. top: 0;
  67. }
  68. .mobileSelect .content .btnBar .cancel {
  69. left: 0;
  70. color: #666;
  71. }
  72. .mobileSelect .content .btnBar .ensure {
  73. right: 0;
  74. color: #1e83d3;
  75. }
  76. .mobileSelect .content .btnBar .title {
  77. font-size: 15px;
  78. padding: 0 15%;
  79. overflow: hidden;
  80. white-space: nowrap;
  81. text-overflow: ellipsis;
  82. }
  83. .mobileSelect .content .panel:after {
  84. content: ".";
  85. display: block;
  86. height: 0;
  87. clear: both;
  88. visibility: hidden;
  89. }
  90. .mobileSelect .content .panel .wheels {
  91. width: 100%;
  92. height: 300px;
  93. overflow: hidden;
  94. }
  95. .mobileSelect .content .panel .wheel {
  96. position: relative;
  97. z-index: 0;
  98. float: left;
  99. width: 50%;
  100. height: 300px;
  101. overflow: hidden;
  102. -webkit-transition: width 0.3s ease;
  103. transition: width 0.3s ease;
  104. }
  105. .mobileSelect .content .panel .wheel .selectContainer {
  106. display: block;
  107. text-align: center;
  108. -webkit-transition: -webkit-transform 0.18s ease-out;
  109. transition: -webkit-transform 0.18s ease-out;
  110. transition: transform 0.18s ease-out;
  111. transition: transform 0.18s ease-out, -webkit-transform 0.18s ease-out;
  112. }
  113. .mobileSelect .content .panel .wheel .selectContainer li {
  114. font-size: 15px;
  115. display: block;
  116. height: 40px;
  117. line-height: 40px;
  118. cursor: pointer;
  119. overflow: hidden;
  120. white-space: nowrap;
  121. text-overflow: ellipsis;
  122. }
  123. .mobileSelect .content .panel .selectLine {
  124. height: 40px;
  125. width: 100%;
  126. position: absolute;
  127. top: 80px;
  128. pointer-events: none;
  129. -webkit-box-sizing: border-box;
  130. box-sizing: border-box;
  131. border-top: 1px solid #DCDCDC;
  132. border-bottom: 1px solid #DCDCDC;
  133. }
  134. .mobileSelect .content .panel .shadowMask {
  135. position: absolute;
  136. top: 0;
  137. width: 100%;
  138. height: 300px;
  139. background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), color-stop(rgba(255, 255, 255, 0)), to(#ffffff));
  140. background: -webkit-linear-gradient(top, #ffffff, rgba(255, 255, 255, 0), #ffffff);
  141. background: linear-gradient(to bottom, #ffffff, rgba(255, 255, 255, 0), #ffffff);
  142. opacity: 0.9;
  143. pointer-events: none;
  144. }
  145. .mobileSelect-show {
  146. opacity: 1;
  147. z-index: 10000;
  148. visibility: visible;
  149. }
  150. .mobileSelect-show .content {
  151. bottom: 0;
  152. }