baguetteBox.css 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. /*!
  2. * baguetteBox.js
  3. * @author feimosi
  4. * @version 0.7.0
  5. * @url https://github.com/feimosi/baguetteBox.js
  6. */
  7. #baguetteBox-overlay {
  8. display: none;
  9. opacity: 0;
  10. position: fixed;
  11. overflow: hidden;
  12. top: 0;
  13. left: 0;
  14. width: 100%;
  15. height: 100%;
  16. z-index: 1000000;
  17. background-color: #222;
  18. background-color: rgba(0, 0, 0, 0.8);
  19. -webkit-transition: opacity 0.5s ease;
  20. transition: opacity 0.5s ease;
  21. }
  22. #baguetteBox-overlay.visible {
  23. opacity: 1;
  24. }
  25. #baguetteBox-overlay .full-image {
  26. display: inline-block;
  27. position: relative;
  28. width: 100%;
  29. height: 100%;
  30. text-align: center;
  31. }
  32. #baguetteBox-overlay .full-image figure {
  33. display: inline;
  34. margin: 0;
  35. height: 100%;
  36. }
  37. #baguetteBox-overlay .full-image img {
  38. display: inline-block;
  39. width: auto;
  40. height: auto;
  41. max-height: 100%;
  42. max-width: 100%;
  43. vertical-align: middle;
  44. -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
  45. -moz-box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
  46. box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
  47. }
  48. #baguetteBox-overlay .full-image figcaption {
  49. display: block;
  50. position: absolute;
  51. bottom: 0;
  52. width: 100%;
  53. text-align: center;
  54. line-height: 1.8;
  55. color: #ccc;
  56. background-color: #000;
  57. background-color: rgba(0, 0, 0, 0.6);
  58. font-family: sans-serif;
  59. }
  60. #baguetteBox-overlay .full-image:before {
  61. content: "";
  62. display: inline-block;
  63. height: 50%;
  64. width: 1px;
  65. margin-right: -1px;
  66. }
  67. #baguetteBox-slider {
  68. position: absolute;
  69. left: 0;
  70. top: 0;
  71. height: 100%;
  72. width: 100%;
  73. white-space: nowrap;
  74. -webkit-transition: left 0.4s ease, -webkit-transform 0.4s ease;
  75. transition: left 0.4s ease, -moz-transform 0.4s ease;
  76. transition: left 0.4s ease, transform 0.4s ease;
  77. }
  78. #baguetteBox-slider.bounce-from-right {
  79. -webkit-animation: bounceFromRight 0.4s ease-out;
  80. animation: bounceFromRight 0.4s ease-out;
  81. }
  82. #baguetteBox-slider.bounce-from-left {
  83. -webkit-animation: bounceFromLeft 0.4s ease-out;
  84. animation: bounceFromLeft 0.4s ease-out;
  85. }
  86. .baguetteBox-button#next-button,
  87. .baguetteBox-button#previous-button {
  88. top: 50%;
  89. top: calc(50% - 30px);
  90. width: 44px;
  91. height: 60px;
  92. }
  93. .baguetteBox-button {
  94. position: absolute;
  95. cursor: pointer;
  96. outline: none;
  97. padding: 0;
  98. margin: 0;
  99. border: 0;
  100. -moz-border-radius: 15%;
  101. border-radius: 15%;
  102. background-color: #323232;
  103. background-color: rgba(50, 50, 50, 0.5);
  104. color: #ddd;
  105. font: 1.6em sans-serif;
  106. -webkit-transition: background-color 0.4s ease;
  107. transition: background-color 0.4s ease;
  108. }
  109. .baguetteBox-button:hover {
  110. background-color: rgba(50, 50, 50, 0.9);
  111. }
  112. .baguetteBox-button#next-button {
  113. right: 2%;
  114. }
  115. .baguetteBox-button#previous-button {
  116. left: 2%;
  117. }
  118. .baguetteBox-button#close-button {
  119. top: 20px;
  120. right: 2%;
  121. right: calc(2% + 6px);
  122. width: 30px;
  123. height: 30px;
  124. }
  125. /*
  126. Preloader
  127. Borrowed from http://tobiasahlin.com/spinkit/
  128. */
  129. .spinner {
  130. width: 40px;
  131. height: 40px;
  132. display: inline-block;
  133. position: absolute;
  134. top: 50%;
  135. left: 50%;
  136. margin-top: -20px;
  137. margin-left: -20px;
  138. }
  139. .double-bounce1,
  140. .double-bounce2 {
  141. width: 100%;
  142. height: 100%;
  143. -moz-border-radius: 50%;
  144. border-radius: 50%;
  145. background-color: #fff;
  146. opacity: 0.6;
  147. position: absolute;
  148. top: 0;
  149. left: 0;
  150. -webkit-animation: bounce 2s infinite ease-in-out;
  151. animation: bounce 2s infinite ease-in-out;
  152. }
  153. .double-bounce2 {
  154. -webkit-animation-delay: -1s;
  155. animation-delay: -1s;
  156. }
  157. @-webkit-keyframes bounceFromRight {
  158. 0% {
  159. margin-left: 0;
  160. }
  161. 50% {
  162. margin-left: -30px;
  163. }
  164. 100% {
  165. margin-left: 0;
  166. }
  167. }
  168. @keyframes bounceFromRight {
  169. 0% {
  170. margin-left: 0;
  171. }
  172. 50% {
  173. margin-left: -30px;
  174. }
  175. 100% {
  176. margin-left: 0;
  177. }
  178. }
  179. @-webkit-keyframes bounceFromLeft {
  180. 0% {
  181. margin-left: 0;
  182. }
  183. 50% {
  184. margin-left: 30px;
  185. }
  186. 100% {
  187. margin-left: 0;
  188. }
  189. }
  190. @keyframes bounceFromLeft {
  191. 0% {
  192. margin-left: 0;
  193. }
  194. 50% {
  195. margin-left: 30px;
  196. }
  197. 100% {
  198. margin-left: 0;
  199. }
  200. }
  201. @-webkit-keyframes bounce {
  202. 0%,100% {
  203. -webkit-transform: scale(0);
  204. transform: scale(0);
  205. }
  206. 50% {
  207. -webkit-transform: scale(1);
  208. transform: scale(1);
  209. }
  210. }
  211. @keyframes bounce {
  212. 0%,100% {
  213. -webkit-transform: scale(0);
  214. -moz-transform: scale(0);
  215. transform: scale(0);
  216. }
  217. 50% {
  218. -webkit-transform: scale(1);
  219. -moz-transform: scale(1);
  220. transform: scale(1);
  221. }
  222. }