nice-select.css 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. .nice-select {
  2. -webkit-tap-highlight-color: transparent;
  3. background-color: #fff;
  4. border-radius: 5px;
  5. border: solid 1px #e8e8e8;
  6. box-sizing: border-box;
  7. clear: both;
  8. cursor: pointer;
  9. display: block;
  10. float: left;
  11. font-family: inherit;
  12. font-size: 14px;
  13. font-weight: normal;
  14. height: 42px;
  15. line-height: 40px;
  16. outline: none;
  17. padding-left: 18px;
  18. padding-right: 30px;
  19. position: relative;
  20. text-align: left !important;
  21. -webkit-transition: all 0.2s ease-in-out;
  22. transition: all 0.2s ease-in-out;
  23. -webkit-user-select: none;
  24. -moz-user-select: none;
  25. -ms-user-select: none;
  26. user-select: none;
  27. white-space: nowrap;
  28. width: auto; }
  29. .nice-select:hover {
  30. border-color: #dbdbdb; }
  31. .nice-select:active, .nice-select.open, .nice-select:focus {
  32. border-color: #999; }
  33. .nice-select:after {
  34. border-bottom: 2px solid #999;
  35. border-right: 2px solid #999;
  36. content: '';
  37. display: block;
  38. height: 5px;
  39. margin-top: -4px;
  40. pointer-events: none;
  41. position: absolute;
  42. right: 12px;
  43. top: 50%;
  44. -webkit-transform-origin: 66% 66%;
  45. -ms-transform-origin: 66% 66%;
  46. transform-origin: 66% 66%;
  47. -webkit-transform: rotate(45deg);
  48. -ms-transform: rotate(45deg);
  49. transform: rotate(45deg);
  50. -webkit-transition: all 0.15s ease-in-out;
  51. transition: all 0.15s ease-in-out;
  52. width: 5px; }
  53. .nice-select.open:after {
  54. -webkit-transform: rotate(-135deg);
  55. -ms-transform: rotate(-135deg);
  56. transform: rotate(-135deg); }
  57. .nice-select.open .list {
  58. opacity: 1;
  59. pointer-events: auto;
  60. -webkit-transform: scale(1) translateY(0);
  61. -ms-transform: scale(1) translateY(0);
  62. transform: scale(1) translateY(0); }
  63. .nice-select.disabled {
  64. border-color: #ededed;
  65. color: #999;
  66. pointer-events: none; }
  67. .nice-select.disabled:after {
  68. border-color: #cccccc; }
  69. .nice-select.wide {
  70. width: 100%; }
  71. .nice-select.wide .list {
  72. left: 0 !important;
  73. right: 0 !important; }
  74. .nice-select.right {
  75. float: right; }
  76. .nice-select.right .list {
  77. left: auto;
  78. right: 0; }
  79. .nice-select.small {
  80. font-size: 12px;
  81. height: 36px;
  82. line-height: 34px; }
  83. .nice-select.small:after {
  84. height: 4px;
  85. width: 4px; }
  86. .nice-select.small .option {
  87. line-height: 34px;
  88. min-height: 34px; }
  89. .nice-select .list {
  90. background-color: #fff;
  91. border-radius: 5px;
  92. box-shadow: 0 0 0 1px rgba(68, 68, 68, 0.11);
  93. box-sizing: border-box;
  94. margin-top: 4px;
  95. opacity: 0;
  96. overflow: hidden;
  97. padding: 0;
  98. pointer-events: none;
  99. position: absolute;
  100. top: 100%;
  101. left: 0;
  102. -webkit-transform-origin: 50% 0;
  103. -ms-transform-origin: 50% 0;
  104. transform-origin: 50% 0;
  105. -webkit-transform: scale(0.75) translateY(-21px);
  106. -ms-transform: scale(0.75) translateY(-21px);
  107. transform: scale(0.75) translateY(-21px);
  108. -webkit-transition: all 0.2s cubic-bezier(0.5, 0, 0, 1.25), opacity 0.15s ease-out;
  109. transition: all 0.2s cubic-bezier(0.5, 0, 0, 1.25), opacity 0.15s ease-out;
  110. z-index: 9; }
  111. .nice-select .list:hover .option:not(:hover) {
  112. background-color: transparent !important; }
  113. .nice-select .option {
  114. cursor: pointer;
  115. font-weight: 400;
  116. line-height: 40px;
  117. list-style: none;
  118. min-height: 40px;
  119. outline: none;
  120. padding-left: 18px;
  121. padding-right: 29px;
  122. text-align: left;
  123. -webkit-transition: all 0.2s;
  124. transition: all 0.2s; }
  125. .nice-select .option:hover, .nice-select .option.focus, .nice-select .option.selected.focus {
  126. background-color: #f6f6f6; }
  127. .nice-select .option.selected {
  128. font-weight: bold; }
  129. .nice-select .option.disabled {
  130. background-color: transparent;
  131. color: #999;
  132. cursor: default; }
  133. .no-csspointerevents .nice-select .list {
  134. display: none; }
  135. .no-csspointerevents .nice-select.open .list {
  136. display: block; }