select2.css 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400
  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. }
  147. .select2-container .select2-search input.select2-active {
  148. background: #fff url('spinner.gif') no-repeat 100%;
  149. background: url('spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
  150. background: url('spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
  151. background: url('spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
  152. background: url('spinner.gif') no-repeat 100%, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
  153. background: url('spinner.gif') no-repeat 100%, -ms-linear-gradient(top, #ffffff 85%, #eeeeee 99%);
  154. background: url('spinner.gif') no-repeat 100%, linear-gradient(top, #ffffff 85%, #eeeeee 99%);
  155. margin: 1px 0;
  156. padding: 4px 20px 4px 5px;
  157. outline: 0;
  158. border: 1px solid #aaa;
  159. font-family: sans-serif;
  160. font-size: 1em;
  161. }
  162. .select2-container-active .select2-choice,
  163. .select2-container-active .select2-choices {
  164. -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
  165. -moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
  166. -o-box-shadow : 0 0 5px rgba(0,0,0,.3);
  167. box-shadow : 0 0 5px rgba(0,0,0,.3);
  168. border: 1px solid #5897fb;
  169. outline: none;
  170. }
  171. .select2-dropdown-open .select2-choice {
  172. border: 1px solid #aaa;
  173. border-bottom: none;
  174. -webkit-box-shadow: 0 1px 0 #fff inset;
  175. -moz-box-shadow : 0 1px 0 #fff inset;
  176. -o-box-shadow : 0 1px 0 #fff inset;
  177. box-shadow : 0 1px 0 #fff inset;
  178. background-color: #eee;
  179. background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, white), color-stop(0.5, #eeeeee));
  180. background-image: -webkit-linear-gradient(center bottom, white 0%, #eeeeee 50%);
  181. background-image: -moz-linear-gradient(center bottom, white 0%, #eeeeee 50%);
  182. background-image: -o-linear-gradient(bottom, white 0%, #eeeeee 50%);
  183. background-image: -ms-linear-gradient(top, #ffffff 0%,#eeeeee 50%);
  184. filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee',GradientType=0 );
  185. background-image: linear-gradient(top, #ffffff 0%,#eeeeee 50%);
  186. -webkit-border-bottom-left-radius : 0;
  187. -webkit-border-bottom-right-radius: 0;
  188. -moz-border-radius-bottomleft : 0;
  189. -moz-border-radius-bottomright: 0;
  190. border-bottom-left-radius : 0;
  191. border-bottom-right-radius: 0;
  192. }
  193. .select2-dropdown-open .select2-choice div {
  194. background: transparent;
  195. border-left: none;
  196. }
  197. .select2-dropdown-open .select2-choice div b {
  198. background-position: -18px 1px;
  199. }
  200. /* results */
  201. .select2-container .select2-results {
  202. margin: 4px 4px 4px 0;
  203. padding: 0 0 0 4px;
  204. position: relative;
  205. overflow-x: hidden;
  206. overflow-y: auto;
  207. max-height: 200px;
  208. }
  209. .select2-container .select2-results li {
  210. line-height: 80%;
  211. padding: 7px 7px 8px;
  212. margin: 0;
  213. list-style: none;
  214. cursor: pointer;
  215. display: list-item;
  216. }
  217. .select2-container .select2-results .select2-highlighted {
  218. background: #3875d7;
  219. color: #fff;
  220. }
  221. .select2-container .select2-results li em {
  222. background: #feffde;
  223. font-style: normal;
  224. }
  225. .select2-container .select2-results .select2-highlighted em {
  226. background: transparent;
  227. }
  228. .select2-container .select2-results .select2-no-results {
  229. background: #f4f4f4;
  230. display: list-item;
  231. }
  232. .select2-container .select2-results .select2-disabled.select2-highlighted {
  233. color: #666;
  234. background: #f4f4f4;
  235. display: list-item;
  236. cursor: default;
  237. }
  238. .select2-container .select2-results .select2-disabled {
  239. background: #f4f4f4;
  240. display: list-item;
  241. cursor: default;
  242. }
  243. .select2-more-results.select2-active {
  244. background: #f4f4f4 url('spinner.gif') no-repeat 100%;
  245. }
  246. .select2-more-results {
  247. background: #f4f4f4;
  248. display: list-item;
  249. }
  250. /* multiselect */
  251. .select2-container-multi .select2-choices {
  252. background-color: #fff;
  253. background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
  254. background-image: -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
  255. background-image: -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
  256. background-image: -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
  257. background-image: -ms-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
  258. background-image: linear-gradient(top, #eeeeee 1%, #ffffff 15%);
  259. border: 1px solid #aaa;
  260. margin: 0;
  261. padding: 0;
  262. cursor: text;
  263. overflow: hidden;
  264. height: auto !important;
  265. height: 1%;
  266. position: relative;
  267. }
  268. .select2-container-multi .select2-drop {
  269. margin-top:0;
  270. }
  271. .select2-container-multi.select2-container-active .select2-choices {
  272. -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
  273. -moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
  274. -o-box-shadow : 0 0 5px rgba(0,0,0,.3);
  275. box-shadow : 0 0 5px rgba(0,0,0,.3);
  276. border: 1px solid #5897fb;
  277. outline: none;
  278. }
  279. .select2-container-multi .select2-choices li {
  280. float: left;
  281. list-style: none;
  282. }
  283. .select2-container-multi .select2-choices .select2-search-field {
  284. white-space: nowrap;
  285. margin: 0;
  286. padding: 0;
  287. }
  288. .select2-container-multi .select2-choices .select2-search-field input {
  289. color: #666;
  290. background: transparent !important;
  291. font-family: sans-serif;
  292. font-size: 100%;
  293. height: 15px;
  294. padding: 5px;
  295. margin: 1px 0;
  296. outline: 0;
  297. border: 0;
  298. -webkit-box-shadow: none;
  299. -moz-box-shadow : none;
  300. -o-box-shadow : none;
  301. box-shadow : none;
  302. }
  303. .select2-default {
  304. color: #999 !important;
  305. }
  306. .select2-container-multi .select2-choices .select2-search-choice {
  307. -webkit-border-radius: 3px;
  308. -moz-border-radius : 3px;
  309. border-radius : 3px;
  310. -moz-background-clip : padding;
  311. -webkit-background-clip: padding-box;
  312. background-clip : padding-box;
  313. background-color: #e4e4e4;
  314. filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f4f4', endColorstr='#eeeeee', GradientType=0 );
  315. 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));
  316. background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
  317. background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
  318. background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
  319. background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
  320. background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
  321. -webkit-box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
  322. -moz-box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
  323. box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
  324. color: #333;
  325. border: 1px solid #aaaaaa;
  326. line-height: 13px;
  327. padding: 3px 5px 3px 18px;
  328. margin: 3px 0 3px 5px;
  329. position: relative;
  330. cursor: default;
  331. }
  332. .select2-container-multi .select2-choices .select2-search-choice span {
  333. cursor: default;
  334. }
  335. .select2-container-multi .select2-choices .select2-search-choice-focus {
  336. background: #d4d4d4;
  337. }
  338. .select2-search-choice-close {
  339. display: block;
  340. position: absolute;
  341. right: 3px;
  342. top: 4px;
  343. width: 12px;
  344. height: 13px;
  345. font-size: 1px;
  346. background: url(select2.png) right top no-repeat;
  347. outline: none;
  348. }
  349. .select2-container-multi .select2-search-choice-close {
  350. left: 3px;
  351. }
  352. .select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover {
  353. background-position: right -11px;
  354. }
  355. .select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close {
  356. background-position: right -11px;
  357. }
  358. .select2-container-multi .select2-results {
  359. margin: -1px 0 0;
  360. padding: 0;
  361. }
  362. /* end multiselect */