index.wxss 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. .city-picker-container {
  2. opacity: 0;
  3. position: fixed;
  4. top: 100vh;
  5. left: 0;
  6. right: 0;
  7. height: 100vh;
  8. z-index: 100;
  9. }
  10. .city-picker-container.show {
  11. top: 0;
  12. opacity: 1;
  13. }
  14. .city-picker-container.show .city-picker-box {
  15. bottom: 0;
  16. }
  17. .city-picker-shadow {
  18. position: absolute;
  19. top: 0;
  20. left: 0;
  21. right: 0;
  22. bottom: 0;
  23. background-color: rgba(0, 0, 0, 0.65);
  24. }
  25. .city-picker-header {
  26. height: 100rpx;
  27. line-height: 100rpx;
  28. text-align: center;
  29. font-size: 32rpx;
  30. color: #333333;
  31. }
  32. .city-picker-more {
  33. display: flex;
  34. justify-content: space-between;
  35. align-items: center;
  36. }
  37. .city-picker-footer {
  38. height: 100rpx;
  39. display: flex;
  40. justify-content: space-between;
  41. align-items: center;
  42. }
  43. .city-picker-footer .btn {
  44. width: 330rpx;
  45. height: 80rpx;
  46. line-height: 80rpx;
  47. text-align: center;
  48. color: #666666;
  49. font-size: 32rpx;
  50. position: relative;
  51. }
  52. .city-picker-footer .btn__active {
  53. opacity: 0.5;
  54. }
  55. .city-picker-footer .btn::after {
  56. display: block;
  57. content: ' ';
  58. position: absolute;
  59. left: -50%;
  60. right: -50%;
  61. top: -50%;
  62. bottom: -50%;
  63. transform: scale(0.5);
  64. border: 1rpx solid #999999;
  65. border-radius: 16rpx;
  66. }
  67. .city-picker-footer .btn.primary {
  68. color: #fa550f;
  69. }
  70. .city-picker-footer .btn.primary::after {
  71. border-color: #fa550f;
  72. }
  73. .picker-column:not(:first-child) {
  74. margin-left: 40rpx;
  75. }
  76. .city-picker-box {
  77. position: absolute;
  78. bottom: -100%;
  79. transition: 0.3s bottom ease-in-out;
  80. left: 0;
  81. right: 0;
  82. z-index: 100;
  83. background-color: #fff;
  84. padding: 0 30rpx;
  85. color: #333333;
  86. font-size: 34rpx;
  87. border-radius: 20rpx 20rpx 0 0;
  88. padding-bottom: env(safe-area-inset-bottom);
  89. }
  90. .show .city-picker-shadow {
  91. display: block;
  92. }
  93. .picker {
  94. height: 300rpx;
  95. margin: 50rpx 0;
  96. line-height: 88rpx;
  97. text-align: center;
  98. }
  99. /* 似乎小程序picker-view的bug,indicator-class仅height生效,其他诸如line-height、text-align等放到父class中设置 */
  100. .picker-center-row {
  101. height: 88rpx;
  102. }