From d9d9fa7f1ac8c63eaf4fa74b3a8350c69551a545 Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Tue, 5 Jan 2021 17:36:42 +0100 Subject: [PATCH] Pure CSS lightbox --- static/css/lightbox.css | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 static/css/lightbox.css diff --git a/static/css/lightbox.css b/static/css/lightbox.css new file mode 100644 index 0000000..3166a75 --- /dev/null +++ b/static/css/lightbox.css @@ -0,0 +1,23 @@ +.lightbox { + display: none; + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 999; + width: 100vw; + height: 100vh; + background: rgba(0, 0, 0, 0.8); } + .lightbox img { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + margin: auto; + max-width: 100%; + max-height: 100%; } + .lightbox:target { + outline: none; + display: block; }