安图前端代码

combo.select.css 3.1KB

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