You are here

imagelightbox.css in ImageLightbox 8

Same filename and directory in other branches
  1. 2.x libraries/imagelightbox.css
  2. 2.0.x libraries/imagelightbox.css
/* IMAGE LIGHTBOX SELECTOR */

#imagelightbox {
    cursor: pointer;
    position: fixed;
    z-index: 10000;
    top: 50%;
    touch-action: none;
    box-shadow: 0 0 3.125em rgba(0, 0, 0, .75); /* 50 */
}

.imagelightbox-open {
    user-select: none;
    overflow: hidden;
}

/* WITH ACTIVITY INDICATION */

.imagelightbox-loading,
.imagelightbox-loading div {
    border-radius: 9999px;
}

.imagelightbox-loading {
    background-color: rgb(128, 128, 128);
    background-color: rgba(0, 0, 0, .5);
    position: fixed;
    z-index: 10003;
    top: 50%;
    left: 50%;
    padding: 0.65em;
    margin: -1.3em 0 0 -1.3em;
    box-shadow: 0 0 2.5em rgba(0, 0, 0, .75); /* 40 */
}

.imagelightbox-loading div {
    width: 1.3em;
    height: 1.3em;
    background-color: #fff;
    animation: imagelightbox-loading .5s ease infinite;
}

@keyframes imagelightbox-loading {
    from {
        opacity: .5;
        transform: scale(.75);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: .5;
        transform: scale(.75);
    }
}

/* WITH OVERLAY */

.imagelightbox-overlay {
    background-color: #202020;
    background-color: rgba(32, 32, 32, .9);
    position: fixed;
    z-index: 9998;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

/* WITH "CLOSE" BUTTON */

.imagelightbox-close {
    cursor: pointer;
    width: 2.5em; /* 40 */
    height: 2.5em; /* 40 */
    background-color: #666;
    position: fixed;
    z-index: 10002;
    top: 2.5em; /* 40 */
    right: 2.5em; /* 40 */
    border-radius: 50%;
    transition: color .3s ease;
}

.imagelightbox-close:hover {
    background-color: #111;
}

.imagelightbox-close:before,
.imagelightbox-close:after {
    width: 2px;
    background-color: #fff;
    content: '';
    position: absolute;
    top: 20%;
    bottom: 20%;
    left: 50%;
    margin-left: -1px;
}

.imagelightbox-close:before {
    transform: rotate(45deg);
}

.imagelightbox-close:after {
    transform: rotate(-45deg);
}

/* WITH CAPTION */

.imagelightbox-caption {
    text-align: center;
    color: #fff;
    background-color: #666;
    position: fixed;
    z-index: 10001;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.625em; /* 10 */
}
.imagelightbox-caption:empty {
    display:none;
}
/* WITH NAVIGATION */

.imagelightbox-nav {
    background-color: #444;
    background-color: rgba(0, 0, 0, .5);
    position: fixed;
    z-index: 10001;
    left: 50%;
    bottom: 3.75em; /* 60 */
    padding: 0.313em; /* 5 */
    transform: translateX(-50%);
    border-radius: 20px;
}

.imagelightbox-nav a {
    position: relative;
    top: 0.2em;
    width: 1em; /* 20 */
    height: 1em; /* 20 */
    border: 1px solid #fff;
    display: inline-block;
    margin: 0 0.313em; /* 5 */
    border-radius: 50%;
}

.imagelightbox-nav .active {
    background-color: #fff;
}

/* WITH ARROWS */

.imagelightbox-arrow {
    background-color: rgba(0, 0, 0, 0);
    display: none;
    height: 7.5em;
    margin-top: -3.75em;
    position: fixed;
    top: 50%;
    vertical-align: middle;
    width: 3.75em;
    z-index: 10001;
    border: none
}
.imagelightbox-arrow:focus,
.imagelightbox-arrow:hover {
    background-color: rgba(0, 0, 0, 0)
}

.imagelightbox-arrow:active {
    background-color: rgba(0, 0, 0, .2)
}
.imagelightbox-arrow-left {
    left: 2.5em; /* 40 */
}
.imagelightbox-arrow-right {
    right: 2.5em; /* 40 */
}
.imagelightbox-arrow:before {
    width: 0;
    height: 0;
    border: 1em solid transparent;
    content: '';
    display: inline-block;
    margin-bottom: -0.125em; /* 2 */
}
.imagelightbox-arrow-left:before {
    border-left: none;
    border-right-color: #fff;
    margin-left: -0.313em; /* 5 */
}
.imagelightbox-arrow-right:before {
    border-right: none;
    border-left-color: #fff;
    margin-right: -0.313em; /* 5 */
}

.imagelightbox-loading,
.imagelightbox-overlay,
.imagelightbox-close,
.imagelightbox-nav,
.imagelightbox-arrow {
    animation: fade-in .25s linear;
}

@keyframes fade-in {
    from	{ opacity: 0; }
    to		{ opacity: 1; }
}

@media only screen and (max-width: 41.250em) { /* 660 */
    #container {
        width: 100%;
    }
    .imagelightbox-close {
        top: 1.25em; /* 20 */
        right: 1.25em; /* 20 */
    }
    .imagelightbox-arrow {
        width: 2.5em; /* 40 */
        height: 3.75em; /* 60 */
        margin-top: -1.875em; /* 30 */
    }
    .imagelightbox-arrow-left {
        left: 1.25em; /* 20 */
    }
    .imagelightbox-arrow-right {
        right: 1.25em; /* 20 */
    }
    .imagelightbox-nav {
        display: none;
    }
}

@media only screen and (max-width: 20em) { /* 320 */
    .imagelightbox-arrow-left {
        left: 0;
    }
    .imagelightbox-arrow-right {
        right: 0;
    }
}

File

libraries/imagelightbox.css
View source
  1. /* IMAGE LIGHTBOX SELECTOR */
  2. #imagelightbox {
  3. cursor: pointer;
  4. position: fixed;
  5. z-index: 10000;
  6. top: 50%;
  7. touch-action: none;
  8. box-shadow: 0 0 3.125em rgba(0, 0, 0, .75); /* 50 */
  9. }
  10. .imagelightbox-open {
  11. user-select: none;
  12. overflow: hidden;
  13. }
  14. /* WITH ACTIVITY INDICATION */
  15. .imagelightbox-loading,
  16. .imagelightbox-loading div {
  17. border-radius: 9999px;
  18. }
  19. .imagelightbox-loading {
  20. background-color: rgb(128, 128, 128);
  21. background-color: rgba(0, 0, 0, .5);
  22. position: fixed;
  23. z-index: 10003;
  24. top: 50%;
  25. left: 50%;
  26. padding: 0.65em;
  27. margin: -1.3em 0 0 -1.3em;
  28. box-shadow: 0 0 2.5em rgba(0, 0, 0, .75); /* 40 */
  29. }
  30. .imagelightbox-loading div {
  31. width: 1.3em;
  32. height: 1.3em;
  33. background-color: #fff;
  34. animation: imagelightbox-loading .5s ease infinite;
  35. }
  36. @keyframes imagelightbox-loading {
  37. from {
  38. opacity: .5;
  39. transform: scale(.75);
  40. }
  41. 50% {
  42. opacity: 1;
  43. transform: scale(1);
  44. }
  45. to {
  46. opacity: .5;
  47. transform: scale(.75);
  48. }
  49. }
  50. /* WITH OVERLAY */
  51. .imagelightbox-overlay {
  52. background-color: #202020;
  53. background-color: rgba(32, 32, 32, .9);
  54. position: fixed;
  55. z-index: 9998;
  56. top: 0;
  57. right: 0;
  58. bottom: 0;
  59. left: 0;
  60. }
  61. /* WITH "CLOSE" BUTTON */
  62. .imagelightbox-close {
  63. cursor: pointer;
  64. width: 2.5em; /* 40 */
  65. height: 2.5em; /* 40 */
  66. background-color: #666;
  67. position: fixed;
  68. z-index: 10002;
  69. top: 2.5em; /* 40 */
  70. right: 2.5em; /* 40 */
  71. border-radius: 50%;
  72. transition: color .3s ease;
  73. }
  74. .imagelightbox-close:hover {
  75. background-color: #111;
  76. }
  77. .imagelightbox-close:before,
  78. .imagelightbox-close:after {
  79. width: 2px;
  80. background-color: #fff;
  81. content: '';
  82. position: absolute;
  83. top: 20%;
  84. bottom: 20%;
  85. left: 50%;
  86. margin-left: -1px;
  87. }
  88. .imagelightbox-close:before {
  89. transform: rotate(45deg);
  90. }
  91. .imagelightbox-close:after {
  92. transform: rotate(-45deg);
  93. }
  94. /* WITH CAPTION */
  95. .imagelightbox-caption {
  96. text-align: center;
  97. color: #fff;
  98. background-color: #666;
  99. position: fixed;
  100. z-index: 10001;
  101. left: 0;
  102. right: 0;
  103. bottom: 0;
  104. padding: 0.625em; /* 10 */
  105. }
  106. .imagelightbox-caption:empty {
  107. display:none;
  108. }
  109. /* WITH NAVIGATION */
  110. .imagelightbox-nav {
  111. background-color: #444;
  112. background-color: rgba(0, 0, 0, .5);
  113. position: fixed;
  114. z-index: 10001;
  115. left: 50%;
  116. bottom: 3.75em; /* 60 */
  117. padding: 0.313em; /* 5 */
  118. transform: translateX(-50%);
  119. border-radius: 20px;
  120. }
  121. .imagelightbox-nav a {
  122. position: relative;
  123. top: 0.2em;
  124. width: 1em; /* 20 */
  125. height: 1em; /* 20 */
  126. border: 1px solid #fff;
  127. display: inline-block;
  128. margin: 0 0.313em; /* 5 */
  129. border-radius: 50%;
  130. }
  131. .imagelightbox-nav .active {
  132. background-color: #fff;
  133. }
  134. /* WITH ARROWS */
  135. .imagelightbox-arrow {
  136. background-color: rgba(0, 0, 0, 0);
  137. display: none;
  138. height: 7.5em;
  139. margin-top: -3.75em;
  140. position: fixed;
  141. top: 50%;
  142. vertical-align: middle;
  143. width: 3.75em;
  144. z-index: 10001;
  145. border: none
  146. }
  147. .imagelightbox-arrow:focus,
  148. .imagelightbox-arrow:hover {
  149. background-color: rgba(0, 0, 0, 0)
  150. }
  151. .imagelightbox-arrow:active {
  152. background-color: rgba(0, 0, 0, .2)
  153. }
  154. .imagelightbox-arrow-left {
  155. left: 2.5em; /* 40 */
  156. }
  157. .imagelightbox-arrow-right {
  158. right: 2.5em; /* 40 */
  159. }
  160. .imagelightbox-arrow:before {
  161. width: 0;
  162. height: 0;
  163. border: 1em solid transparent;
  164. content: '';
  165. display: inline-block;
  166. margin-bottom: -0.125em; /* 2 */
  167. }
  168. .imagelightbox-arrow-left:before {
  169. border-left: none;
  170. border-right-color: #fff;
  171. margin-left: -0.313em; /* 5 */
  172. }
  173. .imagelightbox-arrow-right:before {
  174. border-right: none;
  175. border-left-color: #fff;
  176. margin-right: -0.313em; /* 5 */
  177. }
  178. .imagelightbox-loading,
  179. .imagelightbox-overlay,
  180. .imagelightbox-close,
  181. .imagelightbox-nav,
  182. .imagelightbox-arrow {
  183. animation: fade-in .25s linear;
  184. }
  185. @keyframes fade-in {
  186. from { opacity: 0; }
  187. to { opacity: 1; }
  188. }
  189. @media only screen and (max-width: 41.250em) { /* 660 */
  190. #container {
  191. width: 100%;
  192. }
  193. .imagelightbox-close {
  194. top: 1.25em; /* 20 */
  195. right: 1.25em; /* 20 */
  196. }
  197. .imagelightbox-arrow {
  198. width: 2.5em; /* 40 */
  199. height: 3.75em; /* 60 */
  200. margin-top: -1.875em; /* 30 */
  201. }
  202. .imagelightbox-arrow-left {
  203. left: 1.25em; /* 20 */
  204. }
  205. .imagelightbox-arrow-right {
  206. right: 1.25em; /* 20 */
  207. }
  208. .imagelightbox-nav {
  209. display: none;
  210. }
  211. }
  212. @media only screen and (max-width: 20em) { /* 320 */
  213. .imagelightbox-arrow-left {
  214. left: 0;
  215. }
  216. .imagelightbox-arrow-right {
  217. right: 0;
  218. }
  219. }