select2.css 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. .select2-container {
  2. position: relative;
  3. display: inline-block;
  4. /* inline-block for ie7 */
  5. zoom: 1;
  6. *display: inline;
  7. }
  8. .select2-container .select2-choice {
  9. background-color: #fff;
  10. background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(0.5, white));
  11. background-image: -webkit-linear-gradient(center bottom, #eeeeee 0%, white 50%);
  12. background-image: -moz-linear-gradient(center bottom, #eeeeee 0%, white 50%);
  13. background-image: -o-linear-gradient(top, #eeeeee 0%, #ffffff 50%);
  14. background-image: -ms-linear-gradient(top, #eeeeee 0%, #ffffff 50%);
  15. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#eeeeee', endColorstr = '#ffffff', GradientType = 0);
  16. background-image: linear-gradient(top, #eeeeee 0%, #ffffff 50%);
  17. -webkit-border-radius: 4px;
  18. -moz-border-radius: 4px;
  19. border-radius: 4px;
  20. -moz-background-clip: padding;
  21. -webkit-background-clip: padding-box;
  22. background-clip: padding-box;
  23. border: 1px solid #aaa;
  24. display: block;
  25. overflow: hidden;
  26. white-space: nowrap;
  27. position: relative;
  28. height: 26px;
  29. line-height: 26px;
  30. padding: 0 0 0 8px;
  31. color: #444;
  32. text-decoration: none;
  33. }
  34. .select2-container .select2-choice span {
  35. margin-right: 26px;
  36. display: block;
  37. overflow: hidden;
  38. white-space: nowrap;
  39. -o-text-overflow: ellipsis;
  40. -ms-text-overflow: ellipsis;
  41. text-overflow: ellipsis;
  42. }
  43. .select2-container .select2-drop {
  44. background: #fff;
  45. border: 1px solid #aaa;
  46. border-top: 0;
  47. position: absolute;
  48. top: 29px;
  49. left: 0;
  50. -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
  51. -moz-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
  52. -o-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
  53. box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
  54. z-index: 999;
  55. -webkit-border-radius: 0 0 4px 4px;
  56. -moz-border-radius: 0 0 4px 4px;
  57. border-radius: 0 0 4px 4px;
  58. -moz-background-clip: padding;
  59. -webkit-background-clip: padding-box;
  60. background-clip: padding-box;
  61. }
  62. .select2-container .select2-choice div {
  63. -webkit-border-radius: 0 4px 4px 0;
  64. -moz-border-radius: 0 4px 4px 0;
  65. border-radius: 0 4px 4px 0;
  66. -moz-background-clip: padding;
  67. -webkit-background-clip: padding-box;
  68. background-clip: padding-box;
  69. background: #ccc;
  70. background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ccc), color-stop(0.6, #eee));
  71. background-image: -webkit-linear-gradient(center bottom, #ccc 0%, #eee 60%);
  72. background-image: -moz-linear-gradient(center bottom, #ccc 0%, #eee 60%);
  73. background-image: -o-linear-gradient(bottom, #ccc 0%, #eee 60%);
  74. background-image: -ms-linear-gradient(top, #cccccc 0%, #eeeeee 60%);
  75. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#cccccc', endColorstr = '#eeeeee', GradientType = 0);
  76. background-image: linear-gradient(top, #cccccc 0%, #eeeeee 60%);
  77. border-left: 1px solid #aaa;
  78. position: absolute;
  79. right: 0;
  80. top: 0;
  81. display: block;
  82. height: 100%;
  83. width: 18px;
  84. }
  85. .select2-container .select2-choice div b {
  86. background: url('select2.png') no-repeat 0 1px;
  87. display: block;
  88. width: 100%;
  89. height: 100%;
  90. }
  91. .select2-container .select2-search {
  92. padding: 3px 4px;
  93. position: relative;
  94. margin: 0;
  95. white-space: nowrap;
  96. z-index: 1010;
  97. }
  98. .select2-container .select2-search input {
  99. background: #fff url('select2.png') no-repeat 100% -22px;
  100. background: url('select2.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
  101. background: url('select2.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
  102. background: url('select2.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
  103. background: url('select2.png') no-repeat 100% -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
  104. background: url('select2.png') no-repeat 100% -22px, -ms-linear-gradient(top, #ffffff 85%, #eeeeee 99%);
  105. background: url('select2.png') no-repeat 100% -22px, linear-gradient(top, #ffffff 85%, #eeeeee 99%);
  106. margin: 1px 0;
  107. padding: 4px 20px 4px 5px;
  108. outline: 0;
  109. border: 1px solid #aaa;
  110. font-family: sans-serif;
  111. font-size: 1em;
  112. }
  113. .select2-container .select2-search input.select2-active {
  114. background: #fff url('spinner.gif') no-repeat 100%;
  115. background: url('spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
  116. background: url('spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
  117. background: url('spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
  118. background: url('spinner.gif') no-repeat 100%, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
  119. background: url('spinner.gif') no-repeat 100%, -ms-linear-gradient(top, #ffffff 85%, #eeeeee 99%);
  120. background: url('spinner.gif') no-repeat 100%, linear-gradient(top, #ffffff 85%, #eeeeee 99%);
  121. margin: 1px 0;
  122. padding: 4px 20px 4px 5px;
  123. outline: 0;
  124. border: 1px solid #aaa;
  125. font-family: sans-serif;
  126. font-size: 1em;
  127. }
  128. /* active styles */
  129. .select2-container-focused .select2-choice {
  130. -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
  131. -moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
  132. -o-box-shadow : 0 0 5px rgba(0,0,0,.3);
  133. box-shadow : 0 0 5px rgba(0,0,0,.3);
  134. border: 1px solid #5897fb;
  135. }
  136. .select2-dropdown-open .select2-choice {
  137. border: 1px solid #aaa;
  138. -webkit-box-shadow: 0 1px 0 #fff inset;
  139. -moz-box-shadow : 0 1px 0 #fff inset;
  140. -o-box-shadow : 0 1px 0 #fff inset;
  141. box-shadow : 0 1px 0 #fff inset;
  142. background-color: #eee;
  143. background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, white), color-stop(0.5, #eeeeee));
  144. background-image: -webkit-linear-gradient(center bottom, white 0%, #eeeeee 50%);
  145. background-image: -moz-linear-gradient(center bottom, white 0%, #eeeeee 50%);
  146. background-image: -o-linear-gradient(bottom, white 0%, #eeeeee 50%);
  147. background-image: -ms-linear-gradient(top, #ffffff 0%,#eeeeee 50%);
  148. filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee',GradientType=0 );
  149. background-image: linear-gradient(top, #ffffff 0%,#eeeeee 50%);
  150. -webkit-border-bottom-left-radius : 0;
  151. -webkit-border-bottom-right-radius: 0;
  152. -moz-border-radius-bottomleft : 0;
  153. -moz-border-radius-bottomright: 0;
  154. border-bottom-left-radius : 0;
  155. border-bottom-right-radius: 0;
  156. }
  157. .select2-dropdown-open .select2-choice div {
  158. background: transparent;
  159. border-left: none;
  160. }
  161. .select2-dropdown-open .select2-choice div b {
  162. background-position: -18px 1px;
  163. }
  164. /* results */
  165. .select2-container .select2-results {
  166. margin: 0 4px 4px 0;
  167. padding: 0 0 0 4px;
  168. position: relative;
  169. overflow-x: hidden;
  170. overflow-y: auto;
  171. max-height: 200px;
  172. }
  173. .select2-container .select2-results li {
  174. line-height: 80%;
  175. padding: 7px 7px 8px;
  176. margin: 0;
  177. list-style: none;
  178. cursor: pointer;
  179. display: list-item;
  180. }
  181. .select2-container .select2-results .select2-highlighted {
  182. background: #3875d7;
  183. color: #fff;
  184. }
  185. .select2-container .select2-results li em {
  186. background: #feffde;
  187. font-style: normal;
  188. }
  189. .select2-container .select2-results .select2-highlighted em {
  190. background: transparent;
  191. }
  192. .select2-container .select2-results .select2-no-results {
  193. background: #f4f4f4;
  194. display: list-item;
  195. }
  196. .select2-more-results.select2-active {
  197. background: #f4f4f4 url('spinner.gif') no-repeat 100%;
  198. }
  199. .select2-more-results {
  200. background: #f4f4f4;
  201. display: list-item;
  202. }
  203. /*
  204. .select2-container .select2-drop { border: 1px solid red !important;}
  205. .select2-container .select2-drop .select2-search { border: 1px solid green !important;}
  206. .select2-container .select2-drop .select2-search input { border: 1px solid blue !important;}
  207. */