From d43522b11d9a369166b1a423fc947893112381b5 Mon Sep 17 00:00:00 2001 From: Tejas <147961352+tejas-130704@users.noreply.github.com> Date: Sun, 16 Jun 2024 10:02:17 +0530 Subject: [PATCH] Update style.css --- style.css | 143 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 97 insertions(+), 46 deletions(-) diff --git a/style.css b/style.css index 7fa20c6..0247db4 100644 --- a/style.css +++ b/style.css @@ -1,7 +1,6 @@ * { padding: 0px; margin: 0px; - } body { @@ -16,13 +15,12 @@ body { .main { width: 100%; height: 100%; - background-color:#070f2b; + background-color: #070f2b; display: flex; justify-content: center; align-items: center; } - .second, .hour, .minute { @@ -30,51 +28,49 @@ body { justify-content: center; align-items: center; position: absolute; - box-shadow: 0 0 10px 10px rgba(0,0,0,0.2); + box-shadow: 0 0 10px 10px rgba(0, 0, 0, 0.2); } -#second-hand,#min-hand,#hour-hand{ - width:50px; +#second-hand, #min-hand, #hour-hand { + width: 50px; height: 50px; border-radius: 50%; position: absolute; - top:-25px; - + top: -25px; } -#second-hand{ + +#second-hand { background-image: url('moon.jpg'); background-position: center; background-size: 60px; - box-shadow:0px 5px 13px 0px rgba(255,255,255,0.2), inset 0 10px 5px 0px rgba(0,0,0,0.6); - + box-shadow: 0px 5px 13px 0px rgba(255, 255, 255, 0.2), inset 0 10px 5px 0px rgba(0, 0, 0, 0.6); } -#min-hand{ + +#min-hand { background-image: url('earth.webp'); background-position: center; background-size: 63px; - box-shadow:0px 5px 13px 0px rgba(255,255,255,0.2), inset 0 10px 10px 0px rgba(0,0,0,0.3); - + box-shadow: 0px 5px 13px 0px rgba(255, 255, 255, 0.2), inset 0 10px 10px 0px rgba(0, 0, 0, 0.3); } -#hour-hand{ + +#hour-hand { background-image: url('sun1.jpg'); background-position: center; background-size: 110px; - box-shadow:0px 0px 11px 0px #ffc100, inset 0 0 1px 0px #ffc100; - + box-shadow: 0px 0px 11px 0px #ffc100, inset 0 0 1px 0px #ffc100; } - .time-show { - width: 20vh; - height: 20vh; + width: 20vh; + height: 20vh; border-radius: 50%; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; - font-size:2.5em; + font-size: 2em; z-index: 4; - color: rgba(255,255,255,0.2); + color: rgba(255, 255, 255, 0.2); font-family: Impact; font-weight: lighter; } @@ -84,52 +80,107 @@ body { height: 80vh; border-radius: 50%; z-index: 1; - transition: transform 1s linear ; - border:2px solid rgba(255,255,255,0.2); + transition: transform 1s linear; + border: 2px solid rgba(255, 255, 255, 0.2); } - - #handMin { width: 55vh; height: 55vh; - border:2px solid rgba(255,255,255,0.2); + border: 2px solid rgba(255, 255, 255, 0.2); border-radius: 50%; z-index: 2; - transition: transform 1s linear ; + transition: transform 1s linear; } #handHr { width: 30vh; height: 30vh; - border:2px solid rgba(255,255,255,0.2); + border: 2px solid rgba(255, 255, 255, 0.2); border-radius: 50%; z-index: 3; - transition: transform 1s linear ; -} + transition: transform 1s linear; +} -.star{ +.star { position: absolute; - background-color: rgba(255,255,255); - box-shadow: 0 0 10px 0px rgba(255,255,255,0.5); + background-color: rgba(255, 255, 255); + box-shadow: 0 0 10px 0px rgba(255, 255, 255, 0.5); border-radius: 50%; - } - -#changeTheme{ +#changeTheme { position: absolute; - right:10px; - top: 10px ; - color:rgba(255, 255, 255, 0.594); + right: 10px; + top: 10px; + color: rgba(255, 255, 255, 0.594); border: 1px solid; - padding:3px; + padding: 3px; border-radius: 3px; background-color: transparent; transition: all 1s; } -#changeTheme:hover{ - background-color:rgba(255, 255, 255, 0.594) ; - color:#070f2b; - -} \ No newline at end of file + +#changeTheme:hover { + background-color: rgba(255, 255, 255, 0.594); + color: #070f2b; +} + +/* Responsive Design */ +@media (max-width: 768px) { + .time-show { + width: 15vh; + height: 15vh; + font-size: 1.5em; + } + + .second { + width: 60vh; + height: 60vh; + } + + #handMin { + width: 40vh; + height: 40vh; + } + + #handHr { + width: 25vh; + height: 25vh; + } + + #second-hand, #min-hand, #hour-hand { + width: 40px; + height: 40px; + top: -20px; + } +} + +@media (max-width: 480px) { + .time-show { + width: 10vh; + height: 10vh; + font-size: 1em; + } + + .second { + width: 40vh; + height: 40vh; + } + + #handMin { + width: 30vh; + height: 30vh; + } + + #handHr { + width: 20vh; + height: 20vh; + } + + #second-hand, #min-hand, #hour-hand { + width: 30px; + height: 30px; + top: -15px; + } +}