searchable_select.css 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. /*
  2. Author: David Qin
  3. E-mail: david@hereapp.cn
  4. Date: 2014-11-05
  5. */
  6. .searchable-select-hide {
  7. display: none;
  8. }
  9. .searchable-select {
  10. display: inline-block;
  11. min-width: 200px;
  12. max-width: 340px;
  13. color: #333;
  14. vertical-align: middle;
  15. position: relative;
  16. outline: none;
  17. text-align: left;
  18. white-space: pre-wrap;
  19. /*font-size: 12px;*/
  20. line-height: 20px;
  21. }
  22. .searchable-select-holder {
  23. padding: 4px 20px 4px 6px;
  24. background-color: #fff;
  25. border: 1px solid #eceef1;
  26. /* border-radius: 4px; */
  27. min-height: 34px;
  28. box-sizing: border-box;
  29. /* -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); */
  30. /* box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); */
  31. -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  32. transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  33. text-overflow: ellipsis;
  34. overflow: hidden;
  35. white-space: nowrap;
  36. cursor: pointer;
  37. width: 310px;
  38. }
  39. .searchable-select-caret {
  40. display: inline-block;
  41. width: 0;
  42. height: 0;
  43. border-width: 6px;
  44. border-color: transparent;
  45. position: absolute;
  46. right: 10px;
  47. top: 50%;
  48. margin-top: -3px;
  49. cursor: pointer;
  50. border-top-color: #c2c2c2;
  51. border-top-style: solid;
  52. transition: all .3s;
  53. -webkit-transition: all .3s;
  54. }
  55. .searchable-select-caret.selected {
  56. margin-top: -9px;
  57. -webkit-transform: rotate(180deg);
  58. transform: rotate(180deg);
  59. }
  60. .searchable-select-dropdown {
  61. position: absolute;
  62. background-color: #fff;
  63. border: 1px solid #ccc;
  64. border-bottom-left-radius: 4px;
  65. border-bottom-right-radius: 4px;
  66. padding: 4px;
  67. border-top: none;
  68. top: 28px;
  69. left: 0;
  70. right: 0;
  71. z-index: 7;
  72. }
  73. .searchable-select-input {
  74. border: 1px solid #ccc !important;
  75. outline: none;
  76. padding: 4px !important;
  77. width: 100% !important;
  78. box-sizing: border-box;
  79. height: 25px !important;
  80. border-radius: 0 !important;
  81. margin: 5px 0 0 0 !important;
  82. }
  83. .searchable-scroll {
  84. margin-top: 4px;
  85. position: relative;
  86. }
  87. .searchable-scroll.has-privious {
  88. padding-top: 16px;
  89. }
  90. .searchable-scroll.has-next {
  91. padding-bottom: 16px;
  92. }
  93. .searchable-has-privious {
  94. top: 0;
  95. }
  96. .searchable-has-next {
  97. bottom: 0;
  98. }
  99. .searchable-has-privious, .searchable-has-next {
  100. height: 16px;
  101. left: 0;
  102. right: 0;
  103. position: absolute;
  104. text-align: center;
  105. z-index: 10;
  106. background-color: white;
  107. line-height: 8px;
  108. cursor: pointer;
  109. }
  110. .searchable-select-items {
  111. max-height: 400px;
  112. overflow-y: scroll;
  113. position: relative;
  114. }
  115. .searchable-select-items::-webkit-scrollbar {
  116. display: none;
  117. }
  118. .searchable-select-item {
  119. padding: 5px 5px;
  120. cursor: pointer;
  121. min-height: 36px;
  122. box-sizing: border-box;
  123. transition: all 0.5s ease 0s;
  124. overflow: hidden;
  125. white-space: nowrap;
  126. text-overflow: ellipsis;
  127. }
  128. .searchable-select-item.hover {
  129. background: #3F9DFC;
  130. color: white;
  131. }
  132. .searchable-select-item.selected {
  133. background: #3F9DFC;
  134. color: white;
  135. }