mobileSelect.less 3.9 KB

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