carousel.css 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. /* Bootstrap carousel */
  2. .carousel {
  3. position: relative;
  4. }
  5. .carousel-inner {
  6. position: relative;
  7. overflow: hidden;
  8. width: 100%;
  9. }
  10. .carousel-inner > .item {
  11. position: relative;
  12. display: none;
  13. -webkit-transition: .6s ease-in-out left;
  14. -o-transition: .6s ease-in-out left;
  15. transition: .6s ease-in-out left;
  16. }
  17. .carousel-inner > .item > img,
  18. .carousel-inner > .item > a > img {
  19. line-height: 1;
  20. }
  21. @media all and (transform-3d),
  22. (-webkit-transform-3d) {
  23. .carousel-inner > .item {
  24. -webkit-transition: -webkit-transform .6s ease-in-out;
  25. -o-transition: -o-transform .6s ease-in-out;
  26. transition: transform .6s ease-in-out;
  27. -webkit-backface-visibility: hidden;
  28. backface-visibility: hidden;
  29. -webkit-perspective: 1000;
  30. perspective: 1000;
  31. }
  32. .carousel-inner > .item.next,
  33. .carousel-inner > .item.active.right {
  34. left: 0;
  35. -webkit-transform: translate3d(100%, 0, 0);
  36. transform: translate3d(100%, 0, 0);
  37. }
  38. .carousel-inner > .item.prev,
  39. .carousel-inner > .item.active.left {
  40. left: 0;
  41. -webkit-transform: translate3d(-100%, 0, 0);
  42. transform: translate3d(-100%, 0, 0);
  43. }
  44. .carousel-inner > .item.next.left,
  45. .carousel-inner > .item.prev.right,
  46. .carousel-inner > .item.active {
  47. left: 0;
  48. -webkit-transform: translate3d(0, 0, 0);
  49. transform: translate3d(0, 0, 0);
  50. }
  51. }
  52. .carousel-inner > .active,
  53. .carousel-inner > .next,
  54. .carousel-inner > .prev {
  55. display: block;
  56. }
  57. .carousel-inner > .active {
  58. left: 0;
  59. }
  60. .carousel-inner > .next,
  61. .carousel-inner > .prev {
  62. position: absolute;
  63. top: 0;
  64. width: 100%;
  65. }
  66. .carousel-inner > .next {
  67. left: 100%;
  68. }
  69. .carousel-inner > .prev {
  70. left: -100%;
  71. }
  72. .carousel-inner > .next.left,
  73. .carousel-inner > .prev.right {
  74. left: 0;
  75. }
  76. .carousel-inner > .active.left {
  77. left: -100%;
  78. }
  79. .carousel-inner > .active.right {
  80. left: 100%;
  81. }
  82. .carousel-control {
  83. font-size: 20px;
  84. position: absolute;
  85. top: 0;
  86. bottom: 0;
  87. left: 0;
  88. width: 15%;
  89. text-align: center;
  90. opacity: .5;
  91. color: #fff;
  92. text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
  93. filter: alpha(opacity=50);
  94. }
  95. .carousel-control.left {
  96. background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);
  97. background-image: -o-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);
  98. background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001)));
  99. background-image: linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);
  100. background-repeat: repeat-x;
  101. filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);
  102. }
  103. .carousel-control.right {
  104. right: 0;
  105. left: auto;
  106. background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);
  107. background-image: -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);
  108. background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5)));
  109. background-image: linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);
  110. background-repeat: repeat-x;
  111. filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);
  112. }
  113. .carousel-control:hover,
  114. .carousel-control:focus {
  115. text-decoration: none;
  116. opacity: .9;
  117. color: #fff;
  118. outline: 0;
  119. filter: alpha(opacity=90);
  120. }
  121. .carousel-control .icon-prev,
  122. .carousel-control .icon-next,
  123. .carousel-control .icon-chevron-left,
  124. .carousel-control .icon-chevron-right {
  125. position: absolute;
  126. z-index: 5;
  127. top: 50%;
  128. display: inline-block;
  129. }
  130. .carousel-control .icon-prev,
  131. .carousel-control .icon-chevron-left {
  132. left: 50%;
  133. margin-left: -10px;
  134. }
  135. .carousel-control .icon-next,
  136. .carousel-control .icon-chevron-right {
  137. right: 50%;
  138. margin-right: -10px;
  139. }
  140. .carousel-control .icon-prev,
  141. .carousel-control .icon-next {
  142. font-family: serif;
  143. width: 20px;
  144. height: 20px;
  145. margin-top: -10px;
  146. }
  147. .carousel-control .icon-prev:before {
  148. content: '\2039';
  149. }
  150. .carousel-control .icon-next:before {
  151. content: '\203a';
  152. }
  153. .carousel-indicators {
  154. position: absolute;
  155. z-index: 15;
  156. bottom: 10px;
  157. left: 50%;
  158. width: 60%;
  159. margin-left: -30%;
  160. padding-left: 0;
  161. list-style: none;
  162. text-align: center;
  163. }
  164. .carousel-indicators li {
  165. display: inline-block;
  166. width: 10px;
  167. height: 10px;
  168. margin: 1px;
  169. cursor: pointer;
  170. text-indent: -999px;
  171. border: 1px solid #fff;
  172. border-radius: 10px;
  173. background-color: #000 \9;
  174. background-color: rgba(0, 0, 0, 0);
  175. }
  176. .carousel-indicators .active {
  177. width: 12px;
  178. height: 12px;
  179. margin: 0;
  180. background-color: #fff;
  181. }
  182. .carousel-caption {
  183. position: absolute;
  184. z-index: 10;
  185. right: 15%;
  186. bottom: 20px;
  187. left: 15%;
  188. padding-top: 20px;
  189. padding-bottom: 20px;
  190. text-align: center;
  191. color: #fff;
  192. text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
  193. }
  194. .carousel-caption .btn {
  195. text-shadow: none;
  196. }
  197. @media screen and (min-width: 768px) {
  198. .carousel-control .icon-chevron-left,
  199. .carousel-control .icon-chevron-right,
  200. .carousel-control .icon-prev,
  201. .carousel-control .icon-next {
  202. font-size: 30px;
  203. width: 30px;
  204. height: 30px;
  205. margin-top: -15px;
  206. }
  207. .carousel-control .icon-chevron-left,
  208. .carousel-control .icon-prev {
  209. margin-left: -15px;
  210. }
  211. .carousel-control .icon-chevron-right,
  212. .carousel-control .icon-next {
  213. margin-right: -15px;
  214. }
  215. .carousel-caption {
  216. right: 20%;
  217. left: 20%;
  218. padding-bottom: 30px;
  219. }
  220. .carousel-indicators {
  221. bottom: 20px;
  222. }
  223. }