Advertisement
adilmchoudhury

CSS code for gallery

Nov 23rd, 2023
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.37 KB | None | 0 0
  1. <style>
  2. .sl-overlay {
  3. position: fixed;
  4. left: 0;
  5. right: 0;
  6. top: 0;
  7. bottom: 0;
  8. background: #fff;
  9. display: none;
  10. z-index: 1035;
  11. }
  12.  
  13. .sl-wrapper {
  14. z-index: 1040;
  15. width: 100%;
  16. height: 100%;
  17. left: 0;
  18. top: 0;
  19. position: fixed;
  20. }
  21. .sl-wrapper * {
  22. box-sizing: border-box;
  23. }
  24. .sl-wrapper button {
  25. border: 0 none;
  26. background: transparent;
  27. font-size: 28px;
  28. padding: 0;
  29. cursor: pointer;
  30. }
  31. .sl-wrapper button:hover {
  32. opacity: 0.7;
  33. }
  34. .sl-wrapper .sl-close {
  35. display: none;
  36. position: fixed;
  37. right: 30px;
  38. top: 30px;
  39. z-index: 10060;
  40. margin-top: -14px;
  41. margin-right: -14px;
  42. height: 44px;
  43. width: 44px;
  44. line-height: 44px;
  45. font-family: Arial, Baskerville, monospace;
  46. color: #000;
  47. font-size: 3rem;
  48. }
  49. .sl-wrapper .sl-counter {
  50. display: none;
  51. position: fixed;
  52. top: 30px;
  53. left: 30px;
  54. z-index: 10060;
  55. color: #000;
  56. font-size: 1rem;
  57. }
  58. .sl-wrapper .sl-download {
  59. display: none;
  60. position: fixed;
  61. bottom: 5px;
  62. width: 100%;
  63. text-align: center;
  64. z-index: 10060;
  65. color: #fff;
  66. font-size: 1rem;
  67. }
  68. .sl-wrapper .sl-download a {
  69. color: #fff;
  70. }
  71. .sl-wrapper .sl-navigation {
  72. width: 100%;
  73. display: none;
  74. }
  75. .sl-wrapper .sl-navigation button {
  76. position: fixed;
  77. top: 50%;
  78. margin-top: -22px;
  79. height: 44px;
  80. width: 22px;
  81. line-height: 44px;
  82. text-align: center;
  83. display: block;
  84. z-index: 10060;
  85. font-family: Arial, Baskerville, monospace;
  86. color: #000;
  87. }
  88. .sl-wrapper .sl-navigation button.sl-next {
  89. right: 5px;
  90. font-size: 2rem;
  91. }
  92. .sl-wrapper .sl-navigation button.sl-prev {
  93. left: 5px;
  94. font-size: 2rem;
  95. }
  96. @media (min-width: 35.5em) {
  97. .sl-wrapper .sl-navigation button {
  98. width: 44px;
  99. }
  100. .sl-wrapper .sl-navigation button.sl-next {
  101. right: 10px;
  102. font-size: 3rem;
  103. }
  104. .sl-wrapper .sl-navigation button.sl-prev {
  105. left: 10px;
  106. font-size: 3rem;
  107. }
  108. }
  109. @media (min-width: 50em) {
  110. .sl-wrapper .sl-navigation button {
  111. width: 44px;
  112. }
  113. .sl-wrapper .sl-navigation button.sl-next {
  114. right: 20px;
  115. font-size: 3rem;
  116. }
  117. .sl-wrapper .sl-navigation button.sl-prev {
  118. left: 20px;
  119. font-size: 3rem;
  120. }
  121. }
  122. .sl-wrapper.sl-dir-rtl .sl-navigation {
  123. direction: ltr;
  124. }
  125. .sl-wrapper .sl-image {
  126. position: fixed;
  127. -ms-touch-action: none;
  128. touch-action: none;
  129. z-index: 10000;
  130. }
  131. .sl-wrapper .sl-image img {
  132. margin: 0;
  133. padding: 0;
  134. display: block;
  135. border: 0 none;
  136. width: 100%;
  137. height: auto;
  138. }
  139. @media (min-width: 35.5em) {
  140. .sl-wrapper .sl-image img {
  141. border: 0 none;
  142. }
  143. }
  144. @media (min-width: 50em) {
  145. .sl-wrapper .sl-image img {
  146. border: 0 none;
  147. }
  148. }
  149. .sl-wrapper .sl-image iframe {
  150. background: #000;
  151. border: 0 none;
  152. }
  153. @media (min-width: 35.5em) {
  154. .sl-wrapper .sl-image iframe {
  155. border: 0 none;
  156. }
  157. }
  158. @media (min-width: 50em) {
  159. .sl-wrapper .sl-image iframe {
  160. border: 0 none;
  161. }
  162. }
  163. .sl-wrapper .sl-image .sl-caption {
  164. display: none;
  165. padding: 10px;
  166. color: #fff;
  167. background: rgba(0, 0, 0, 0.8);
  168. font-size: 1rem;
  169. position: absolute;
  170. bottom: 0;
  171. left: 0;
  172. right: 0;
  173. }
  174. .sl-wrapper .sl-image .sl-caption.pos-top {
  175. bottom: auto;
  176. top: 0;
  177. }
  178. .sl-wrapper .sl-image .sl-caption.pos-outside {
  179. bottom: auto;
  180. }
  181.  
  182. .sl-spinner {
  183. display: none;
  184. border: 5px solid #333;
  185. border-radius: 40px;
  186. height: 40px;
  187. left: 50%;
  188. margin: -20px 0 0 -20px;
  189. opacity: 0;
  190. position: fixed;
  191. top: 50%;
  192. width: 40px;
  193. z-index: 1007;
  194. -webkit-animation: pulsate 1s ease-out infinite;
  195. -moz-animation: pulsate 1s ease-out infinite;
  196. -ms-animation: pulsate 1s ease-out infinite;
  197. -o-animation: pulsate 1s ease-out infinite;
  198. animation: pulsate 1s ease-out infinite;
  199. }
  200.  
  201. .sl-scrollbar-measure {
  202. position: absolute;
  203. top: -9999px;
  204. width: 50px;
  205. height: 50px;
  206. overflow: scroll;
  207. }
  208.  
  209. .sl-transition {
  210. transition: -moz-transform ease 200ms;
  211. transition: -ms-transform ease 200ms;
  212. transition: -o-transform ease 200ms;
  213. transition: -webkit-transform ease 200ms;
  214. transition: transform ease 200ms;
  215. }
  216.  
  217. @-webkit-keyframes pulsate {
  218. 0% {
  219. transform: scale(0.1);
  220. opacity: 0;
  221. }
  222. 50% {
  223. opacity: 1;
  224. }
  225. 100% {
  226. transform: scale(1.2);
  227. opacity: 0;
  228. }
  229. }
  230. @keyframes pulsate {
  231. 0% {
  232. transform: scale(0.1);
  233. opacity: 0;
  234. }
  235. 50% {
  236. opacity: 1;
  237. }
  238. 100% {
  239. transform: scale(1.2);
  240. opacity: 0;
  241. }
  242. }
  243. @-moz-keyframes pulsate {
  244. 0% {
  245. transform: scale(0.1);
  246. opacity: 0;
  247. }
  248. 50% {
  249. opacity: 1;
  250. }
  251. 100% {
  252. transform: scale(1.2);
  253. opacity: 0;
  254. }
  255. }
  256. @-o-keyframes pulsate {
  257. 0% {
  258. transform: scale(0.1);
  259. opacity: 0;
  260. }
  261. 50% {
  262. opacity: 1;
  263. }
  264. 100% {
  265. transform: scale(1.2);
  266. opacity: 0;
  267. }
  268. }
  269. @-ms-keyframes pulsate {
  270. 0% {
  271. transform: scale(0.1);
  272. opacity: 0;
  273. }
  274. 50% {
  275. opacity: 1;
  276. }
  277. 100% {
  278. transform: scale(1.2);
  279. opacity: 0;
  280. }
  281. }
  282. .gallery a img {
  283. float: left;
  284. width: 25%;
  285. height: auto;
  286. border: 2px solid #fff;
  287. -webkit-transition: -webkit-transform .15s ease;
  288. -moz-transition: -moz-transform .15s ease;
  289. -o-transition: -o-transform .15s ease;
  290. -ms-transition: -ms-transform .15s ease;
  291. transition: transform .15s ease;
  292. position: relative;
  293. }
  294. </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement