nice-select.css 3.6 KB

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