select2.css 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  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,
  9. .select2-drop,
  10. .select2-search,
  11. .select2-container .select2-search input{
  12. /*
  13. Force border-box so that % widths fit the parent
  14. container without overlap because of margin/padding.
  15. More Info : http://www.quirksmode.org/css/box.html
  16. */
  17. -moz-box-sizing: border-box; /* firefox */
  18. -ms-box-sizing: border-box; /* ie */
  19. -webkit-box-sizing: border-box; /* webkit */
  20. -khtml-box-sizing: border-box; /* konqueror */
  21. box-sizing: border-box; /* css3 */
  22. }
  23. .select2-container .select2-choice {
  24. background-color: #fff;
  25. background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(0.5, white));
  26. background-image: -webkit-linear-gradient(center bottom, #eeeeee 0%, white 50%);
  27. background-image: -moz-linear-gradient(center bottom, #eeeeee 0%, white 50%);
  28. background-image: -o-linear-gradient(bottom, #eeeeee 0%, #ffffff 50%);
  29. background-image: -ms-linear-gradient(top, #eeeeee 0%, #ffffff 50%);
  30. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#eeeeee', endColorstr = '#ffffff', GradientType = 0);
  31. background-image: linear-gradient(top, #eeeeee 0%, #ffffff 50%);
  32. -webkit-border-radius: 4px;
  33. -moz-border-radius: 4px;
  34. border-radius: 4px;
  35. -moz-background-clip: padding;
  36. -webkit-background-clip: padding-box;
  37. background-clip: padding-box;
  38. border: 1px solid #aaa;
  39. display: block;
  40. overflow: hidden;
  41. white-space: nowrap;
  42. position: relative;
  43. height: 26px;
  44. line-height: 26px;
  45. padding: 0 0 0 8px;
  46. color: #444;
  47. text-decoration: none;
  48. }
  49. .select2-container .select2-choice span {
  50. margin-right: 26px;
  51. display: block;
  52. overflow: hidden;
  53. white-space: nowrap;
  54. -o-text-overflow: ellipsis;
  55. -ms-text-overflow: ellipsis;
  56. text-overflow: ellipsis;
  57. }
  58. .select2-container .select2-choice abbr {
  59. display: block;
  60. position: absolute;
  61. right: 26px;
  62. top: 8px;
  63. width: 12px;
  64. height: 12px;
  65. font-size: 1px;
  66. background: url(select2.png) right top no-repeat;
  67. cursor: pointer;
  68. text-decoration: none;
  69. border:0;
  70. outline: 0;
  71. }
  72. .select2-container .select2-choice abbr:hover {
  73. background-position: right -11px;
  74. cursor: pointer;
  75. }
  76. .select2-container .select2-drop {
  77. background: #fff;
  78. border: 1px solid #aaa;
  79. border-top: 0;
  80. position: absolute;
  81. top: 29px;
  82. -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
  83. -moz-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
  84. -o-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
  85. box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
  86. z-index: 999;
  87. width:100%;
  88. margin-top:-1px;
  89. -webkit-border-radius: 0 0 4px 4px;
  90. -moz-border-radius: 0 0 4px 4px;
  91. border-radius: 0 0 4px 4px;
  92. }
  93. .select2-container .select2-choice div {
  94. -webkit-border-radius: 0 4px 4px 0;
  95. -moz-border-radius: 0 4px 4px 0;
  96. border-radius: 0 4px 4px 0;
  97. -moz-background-clip: padding;
  98. -webkit-background-clip: padding-box;
  99. background-clip: padding-box;
  100. background: #ccc;
  101. background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ccc), color-stop(0.6, #eee));
  102. background-image: -webkit-linear-gradient(center bottom, #ccc 0%, #eee 60%);
  103. background-image: -moz-linear-gradient(center bottom, #ccc 0%, #eee 60%);
  104. background-image: -o-linear-gradient(bottom, #ccc 0%, #eee 60%);
  105. background-image: -ms-linear-gradient(top, #cccccc 0%, #eeeeee 60%);
  106. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#cccccc', endColorstr = '#eeeeee', GradientType = 0);
  107. background-image: linear-gradient(top, #cccccc 0%, #eeeeee 60%);
  108. border-left: 1px solid #aaa;
  109. position: absolute;
  110. right: 0;
  111. top: 0;
  112. display: block;
  113. height: 100%;
  114. width: 18px;
  115. }
  116. .select2-container .select2-choice div b {
  117. background: url('select2.png') no-repeat 0 1px;
  118. display: block;
  119. width: 100%;
  120. height: 100%;
  121. }
  122. .select2-container .select2-search {
  123. display: inline-block;
  124. white-space: nowrap;
  125. z-index: 1010;
  126. min-height: 26px;
  127. width: 100%;
  128. margin: 0;
  129. padding-left: 4px;
  130. padding-right: 4px;
  131. }
  132. .select2-container .select2-search input {
  133. background: #fff url('select2.png') no-repeat 100% -22px;
  134. 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));
  135. background: url('select2.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
  136. background: url('select2.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
  137. background: url('select2.png') no-repeat 100% -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
  138. background: url('select2.png') no-repeat 100% -22px, -ms-linear-gradient(top, #ffffff 85%, #eeeeee 99%);
  139. background: url('select2.png') no-repeat 100% -22px, linear-gradient(top, #ffffff 85%, #eeeeee 99%);
  140. padding: 4px 20px 4px 5px;
  141. outline: 0;
  142. border: 1px solid #aaa;
  143. font-family: sans-serif;
  144. font-size: 1em;
  145. width:100%;
  146. margin:0;
  147. height:auto !important;
  148. min-height: 26px;
  149. -webkit-box-shadow: none;
  150. -moz-box-shadow: none;
  151. box-shadow: none;
  152. border-radius: 0;
  153. -moz-border-radius: 0;
  154. -webkit-border-radius: 0;
  155. }
  156. .select2-container .select2-search input.select2-active {
  157. background: #fff url('spinner.gif') no-repeat 100%;
  158. background: url('spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
  159. background: url('spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
  160. background: url('spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
  161. background: url('spinner.gif') no-repeat 100%, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
  162. background: url('spinner.gif') no-repeat 100%, -ms-linear-gradient(top, #ffffff 85%, #eeeeee 99%);
  163. background: url('spinner.gif') no-repeat 100%, linear-gradient(top, #ffffff 85%, #eeeeee 99%);
  164. }
  165. .select2-container-active .select2-choice,
  166. .select2-container-active .select2-choices {
  167. -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
  168. -moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
  169. -o-box-shadow : 0 0 5px rgba(0,0,0,.3);
  170. box-shadow : 0 0 5px rgba(0,0,0,.3);
  171. border: 1px solid #5897fb;
  172. outline: none;
  173. }
  174. .select2-dropdown-open .select2-choice {
  175. border: 1px solid #aaa;
  176. border-bottom: none;
  177. -webkit-box-shadow: 0 1px 0 #fff inset;
  178. -moz-box-shadow : 0 1px 0 #fff inset;
  179. -o-box-shadow : 0 1px 0 #fff inset;
  180. box-shadow : 0 1px 0 #fff inset;
  181. background-color: #eee;
  182. background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, white), color-stop(0.5, #eeeeee));
  183. background-image: -webkit-linear-gradient(center bottom, white 0%, #eeeeee 50%);
  184. background-image: -moz-linear-gradient(center bottom, white 0%, #eeeeee 50%);
  185. background-image: -o-linear-gradient(bottom, white 0%, #eeeeee 50%);
  186. background-image: -ms-linear-gradient(top, #ffffff 0%,#eeeeee 50%);
  187. filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee',GradientType=0 );
  188. background-image: linear-gradient(top, #ffffff 0%,#eeeeee 50%);
  189. -webkit-border-bottom-left-radius : 0;
  190. -webkit-border-bottom-right-radius: 0;
  191. -moz-border-radius-bottomleft : 0;
  192. -moz-border-radius-bottomright: 0;
  193. border-bottom-left-radius : 0;
  194. border-bottom-right-radius: 0;
  195. }
  196. .select2-dropdown-open .select2-choice div {
  197. background: transparent;
  198. border-left: none;
  199. }
  200. .select2-dropdown-open .select2-choice div b {
  201. background-position: -18px 1px;
  202. }
  203. /* results */
  204. .select2-container .select2-results {
  205. margin: 4px 4px 4px 0;
  206. padding: 0 0 0 4px;
  207. position: relative;
  208. overflow-x: hidden;
  209. overflow-y: auto;
  210. max-height: 200px;
  211. }
  212. .select2-container .select2-results li {
  213. line-height: 80%;
  214. padding: 7px 7px 8px;
  215. margin: 0;
  216. list-style: none;
  217. cursor: pointer;
  218. display: list-item;
  219. }
  220. .select2-container .select2-results .select2-highlighted {
  221. background: #3875d7;
  222. color: #fff;
  223. }
  224. .select2-container .select2-results li em {
  225. background: #feffde;
  226. font-style: normal;
  227. }
  228. .select2-container .select2-results .select2-highlighted em {
  229. background: transparent;
  230. }
  231. .select2-container .select2-results .select2-no-results {
  232. background: #f4f4f4;
  233. display: list-item;
  234. }
  235. .select2-container .select2-results .select2-disabled.select2-highlighted {
  236. color: #666;
  237. background: #f4f4f4;
  238. display: list-item;
  239. cursor: default;
  240. }
  241. .select2-container .select2-results .select2-disabled {
  242. background: #f4f4f4;
  243. display: list-item;
  244. cursor: default;
  245. }
  246. .select2-more-results.select2-active {
  247. background: #f4f4f4 url('spinner.gif') no-repeat 100%;
  248. }
  249. .select2-more-results {
  250. background: #f4f4f4;
  251. display: list-item;
  252. }
  253. /* multiselect */
  254. .select2-container-multi .select2-choices {
  255. background-color: #fff;
  256. background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
  257. background-image: -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
  258. background-image: -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
  259. background-image: -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
  260. background-image: -ms-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
  261. background-image: linear-gradient(top, #eeeeee 1%, #ffffff 15%);
  262. border: 1px solid #aaa;
  263. margin: 0;
  264. padding: 0;
  265. cursor: text;
  266. overflow: hidden;
  267. height: auto !important;
  268. height: 1%;
  269. position: relative;
  270. }
  271. .select2-container-multi .select2-drop {
  272. margin-top:0;
  273. }
  274. .select2-container-multi.select2-container-active .select2-choices {
  275. -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
  276. -moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
  277. -o-box-shadow : 0 0 5px rgba(0,0,0,.3);
  278. box-shadow : 0 0 5px rgba(0,0,0,.3);
  279. border: 1px solid #5897fb;
  280. outline: none;
  281. }
  282. .select2-container-multi .select2-choices li {
  283. float: left;
  284. list-style: none;
  285. }
  286. .select2-container-multi .select2-choices .select2-search-field {
  287. white-space: nowrap;
  288. margin: 0;
  289. padding: 0;
  290. }
  291. .select2-container-multi .select2-choices .select2-search-field input {
  292. color: #666;
  293. background: transparent !important;
  294. font-family: sans-serif;
  295. font-size: 100%;
  296. height: 15px;
  297. padding: 5px;
  298. margin: 1px 0;
  299. outline: 0;
  300. border: 0;
  301. -webkit-box-shadow: none;
  302. -moz-box-shadow : none;
  303. -o-box-shadow : none;
  304. box-shadow : none;
  305. }
  306. .select2-default {
  307. color: #999 !important;
  308. }
  309. .select2-container-multi .select2-choices .select2-search-choice {
  310. -webkit-border-radius: 3px;
  311. -moz-border-radius : 3px;
  312. border-radius : 3px;
  313. -moz-background-clip : padding;
  314. -webkit-background-clip: padding-box;
  315. background-clip : padding-box;
  316. background-color: #e4e4e4;
  317. filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f4f4', endColorstr='#eeeeee', GradientType=0 );
  318. background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
  319. background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
  320. background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
  321. background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
  322. background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
  323. background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
  324. -webkit-box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
  325. -moz-box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
  326. box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
  327. color: #333;
  328. border: 1px solid #aaaaaa;
  329. line-height: 13px;
  330. padding: 3px 5px 3px 18px;
  331. margin: 3px 0 3px 5px;
  332. position: relative;
  333. cursor: default;
  334. }
  335. .select2-container-multi .select2-choices .select2-search-choice span {
  336. cursor: default;
  337. }
  338. .select2-container-multi .select2-choices .select2-search-choice-focus {
  339. background: #d4d4d4;
  340. }
  341. .select2-search-choice-close {
  342. display: block;
  343. position: absolute;
  344. right: 3px;
  345. top: 4px;
  346. width: 12px;
  347. height: 13px;
  348. font-size: 1px;
  349. background: url(select2.png) right top no-repeat;
  350. outline: none;
  351. }
  352. .select2-container-multi .select2-search-choice-close {
  353. left: 3px;
  354. }
  355. .select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover {
  356. background-position: right -11px;
  357. }
  358. .select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close {
  359. background-position: right -11px;
  360. }
  361. .select2-container-multi .select2-results {
  362. margin: -1px 0 0;
  363. padding: 0;
  364. }
  365. /* end multiselect */