`` element with the class attribute ``lightbox-block`` and a class
attribute based on the alignment i.e. ``align-left``.
For example;
.. code-block:: html
...
The thumbnail image will have an alignment class attribute too.
.. code-block:: html
The large image and the anchor that closes it have the class attribute
``lightbox`` which initially sets their display as hidden.
.. code-block:: html
Finally, the parent ``div`` element is closed and a final ``div`` element with
the class attribute ``lightbox-divider`` is provided, allowing you to create a
defined separation between images.
.. code-block:: html
Putting all elements together, this is how the final HTML will be returned.
.. code-block:: html
Homepage (click to view large image)
Basic CSS for Lightbox
======================
.. code-block:: css
.lightbox {
display: none;
position: fixed;
z-index: 999;
width: 100%;
height: 100%;
text-align: center;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,0.8);
}
.lightbox img {
max-width: 98%;
max-height: 90%;
margin-top: 2%;
}
.lightbox:target {
outline: none;
display: block;
}
.lightbox-divider {
background: #E0E0E0;
width: 100%;
height: 3px;
-webkit-flex-shrink: 0;
-ms-flex-negative: 0;
flex-shrink: 0;
margin: 30px 0;
}
You can get a copy of this `basic CSS file from GitHub
`_.
Source code
===========
The source code of Lightbox is `hosted on GitHub
`__.
License
=======
Lightbox is released under the `MIT license
`__.