From 4cac16033700340d9b701eaa72201964f251feec Mon Sep 17 00:00:00 2001 From: KTrain5369 <69028025+KTrain5169@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:44:04 +0700 Subject: [PATCH] add expand when clicked function to gallery --- crashes.html | 38 +++++++++++++++++++++++++++++--------- css/gallery.css | 31 +++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 9 deletions(-) diff --git a/crashes.html b/crashes.html index e9665a9..7272cbe 100644 --- a/crashes.html +++ b/crashes.html @@ -9,15 +9,35 @@ Gallery: Essential confirmed to be cause of crashes + + + + diff --git a/css/gallery.css b/css/gallery.css index 7f8a8c0..f157700 100644 --- a/css/gallery.css +++ b/css/gallery.css @@ -46,3 +46,34 @@ b { flex-direction: column; /* Stack images vertically on small screens */ } } + +/* Modal background */ +.modal { + display: none; /* Hidden by default */ + position: fixed; + z-index: 100; /* On top of other content */ + left: 0; + top: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.9); /* Black background with transparency */ + justify-content: center; + align-items: center; +} + +/* Modal image */ +.modal img { + max-width: 90%; + max-height: 90%; + border-radius: 8px; +} + +/* Close button for modal */ +.modal-close { + position: absolute; + top: 10px; + right: 20px; + font-size: 30px; + color: white; + cursor: pointer; +}