ZZDianXin_UI - 郑州电信 演示

select.css 3.0KB

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