custom-picker.css 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. @keyframes slideUp {
  2. 0% {
  3. bottom:-40%;
  4. }
  5. 100% {
  6. bottom:0;
  7. }
  8. }
  9. @-moz-keyframes slideUp {
  10. 0% {
  11. bottom:-40%;
  12. }
  13. 100% {
  14. bottom:0;
  15. }
  16. }
  17. @-webkit-keyframes slideUp {
  18. 0% {
  19. bottom:-40%;
  20. }
  21. 100% {
  22. bottom:0;
  23. }
  24. }
  25. @-o-keyframes slideUp {
  26. 0% {
  27. bottom:-40%;
  28. }
  29. 100% {
  30. bottom:0;
  31. }
  32. }
  33. .pickerView-wrap * {
  34. margin:0;
  35. padding:0;
  36. list-style: none;
  37. -webkit-box-sizing: border-box;
  38. -ms-box-sizing:border-box;
  39. -moz-box-sizing:border-box;
  40. box-sizing: border-box;
  41. font-size: 0;
  42. }
  43. .pickerView-wrap {
  44. position: fixed;
  45. left:0;
  46. top:0;
  47. height:100%;
  48. width:100%;
  49. z-index: 666;
  50. }
  51. .pickerView-mask {
  52. height:100%;
  53. width:100%;
  54. background:rgba(0,0,0,.5);
  55. }
  56. .pickerView-box {
  57. height:40%;
  58. width:100%;
  59. position: absolute;
  60. left:0;
  61. bottom:0;
  62. background: #fff;
  63. padding-top:45px;
  64. animation: slideUp 0.3s;
  65. }
  66. .pickerView-box-header {
  67. text-align: center;
  68. height:45px;
  69. border-bottom:1px solid #ddd;
  70. width:100%;
  71. padding:0 50px;
  72. position: absolute;
  73. left:0;
  74. top:0;
  75. z-index: 10;
  76. background: #fff;
  77. }
  78. .pickerView-box-header>div {
  79. line-height: 44px;
  80. font-size: 16px;
  81. }
  82. .pickerView-box-header-btn {
  83. height:100%;
  84. width:50px;
  85. position: absolute;
  86. top:0;
  87. }
  88. .pickerView-box-header-left {
  89. left:0;
  90. color:#888;
  91. }
  92. .pickerView-box-header-right {
  93. right:0;
  94. color:#108ee9;
  95. }
  96. .pickerView-box-header-title {
  97. text-align: center;
  98. height:100%;
  99. width:100%;
  100. overflow:hidden;
  101. white-space: nowrap;
  102. text-overflow: ellipsis;
  103. }
  104. .pickerView-box-content-wrap {
  105. height:100%;
  106. width:100%;
  107. overflow: hidden;
  108. position: relative;
  109. display: -webkit-box;
  110. display: -webkit-flex;
  111. display: -ms-flexbox;
  112. display: flex;
  113. }
  114. .pickerView-box-content {
  115. -webkit-box-flex: 1;
  116. -webkit-flex: 1;
  117. -ms-flex: 1;
  118. flex: 1;
  119. position: relative;
  120. }
  121. .pickerView-box-content-mask {
  122. position: absolute;
  123. left: 0;
  124. bottom:0;
  125. height: 100%;
  126. margin: 0 auto;
  127. width: 100%;
  128. z-index: 3;
  129. background-image: -webkit-linear-gradient(top, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6)), -webkit-linear-gradient(bottom, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6));
  130. background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 0.95)), to(rgba(255, 255, 255, 0.6))), -webkit-gradient(linear, left bottom, left top, from(rgba(255, 255, 255, 0.95)), to(rgba(255, 255, 255, 0.6)));
  131. background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6)), linear-gradient(to top, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6));
  132. background-position: top, bottom;
  133. background-size: 100% 102px;
  134. background-repeat: no-repeat;
  135. }
  136. .pickerView-box-content-indicator {
  137. -webkit-box-sizing: border-box;
  138. box-sizing: border-box;
  139. width: 100%;
  140. height: 34px;
  141. position: absolute;
  142. left: 0;
  143. top: 102px;
  144. z-index: 3;
  145. border-top: 1PX solid #ddd;
  146. border-bottom: 1PX solid #ddd;
  147. }
  148. .pickerView-items {
  149. position: absolute;
  150. left: 0;
  151. top: 0;
  152. width: 100%;
  153. z-index: 1;
  154. padding: 102px 0;
  155. padding: 102px 0px;
  156. }
  157. .pickerView-item {
  158. touch-action: manipulation;
  159. text-align: center;
  160. font-size: 16px;
  161. height: 34px;
  162. line-height: 34px;
  163. color: #000;
  164. overflow:hidden;
  165. white-space: nowrap;
  166. text-overflow: ellipsis;
  167. }