ZZDianXin_UI - 郑州电信 演示

select.css 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. /**
  2. * Variables
  3. */
  4. /**
  5. * Wrapper
  6. */
  7. .combo-select {
  8. position: relative;
  9. max-width: 400px;
  10. margin-bottom: 15px;
  11. font: 100% Helvetica, Arial, Sans-serif;
  12. border: 1px solid #e5e6e7;
  13. border-radius: 3px; }
  14. .combo-select .combo-input {
  15. margin-bottom: 0; }
  16. /**
  17. * Input field
  18. */
  19. .combo-input {
  20. -webkit-appearance: none;
  21. -moz-appearance: none;
  22. appearance: none;
  23. margin: 0;
  24. text-overflow: ellipsis;
  25. white-space: nowrap;
  26. border: none;
  27. width: 100%;
  28. box-sizing: border-box;
  29. padding: 12px;
  30. padding-right: 60px;
  31. border-radius: 3px; }
  32. .combo-input:focus {
  33. outline: none; }
  34. /**
  35. * Arrow
  36. */
  37. .combo-arrow {
  38. position: absolute;
  39. right: 0;
  40. top: 0;
  41. height: 100%;
  42. cursor: pointer;
  43. text-align: center;
  44. font-size: 14px;
  45. width: 40px;
  46. font-size: 12px;
  47. color: #999999; }
  48. .combo-arrow:before {
  49. content: " ";
  50. border-left: 5px solid transparent;
  51. border-right: 5px solid transparent;
  52. border-top: 5px solid #cccccc;
  53. display: block;
  54. width: 0;
  55. height: 0;
  56. top: 0;
  57. right: 15px;
  58. bottom: 0;
  59. position: absolute;
  60. margin: auto 0; }
  61. /**
  62. * When opened
  63. */
  64. .combo-open .combo-arrow {
  65. border-color: #51A7E8; }
  66. .combo-open .combo-arrow:before {
  67. border-top: none;
  68. border-bottom: 5px solid #cccccc; }
  69. /**
  70. * When focused
  71. */
  72. .combo-focus {
  73. box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
  74. border-color: #51A7E8; }
  75. .combo-focus input {
  76. border-color: #51A7E8; }
  77. /**
  78. * Hide native select
  79. */
  80. .combo-select select {
  81. position: absolute;
  82. z-index: 1;
  83. left: 0;
  84. top: 0;
  85. width: 100%;
  86. height: 100%;
  87. -webkit-appearance: none;
  88. opacity: 0; }
  89. @media only screen and (min-width: 960px) {
  90. .combo-select select {
  91. left: -1px;
  92. top: -1px;
  93. width: 0;
  94. height: 0;
  95. margin: 0; } }
  96. /**
  97. * Selected option
  98. */
  99. .option-selected {
  100. background-color: #eee; }
  101. /**
  102. * Hovered option
  103. */
  104. .option-hover {
  105. background-color: #E43926;
  106. color: #fff; }
  107. /**
  108. * Option item
  109. */
  110. .option-item {
  111. cursor: pointer;
  112. border-bottom: 1px #e3e3e3 solid; }
  113. .option-item:hover {
  114. background-color: #E43926;
  115. color: #fff; }
  116. .option-item:last-child {
  117. border-bottom: none; }
  118. /**
  119. * Disabled and optgroups
  120. */
  121. .option-group {
  122. cursor: text;
  123. font-weight: 600;
  124. background: #e1e1e1;
  125. border: 1px #ccc solid;
  126. border-width: 1px 0; }
  127. /**
  128. * Disabled
  129. */
  130. .option-disabled {
  131. opacity: 0.5; }
  132. /**
  133. * Dropdown
  134. */
  135. .combo-dropdown {
  136. position: absolute;
  137. z-index: 1;
  138. top: 100%;
  139. left: 0;
  140. min-width: 100%;
  141. max-width: 300px;
  142. max-height: 300px;
  143. margin: 0;
  144. padding: 0;
  145. display: none;
  146. overflow-y: auto;
  147. background: #fff;
  148. border: 1px solid #999999;
  149. border-radius: 0;
  150. box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
  151. box-sizing: border-box; }
  152. .combo-dropdown li {
  153. list-style: none;
  154. padding: 8px 1em;
  155. margin: 0; }
  156. /**
  157. * On Active
  158. */
  159. .combo-open .combo-dropdown {
  160. display: block; }
  161. /**
  162. * Search marker
  163. */
  164. .combo-marker {
  165. text-decoration: underline; }