Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove width and update styles
  • Loading branch information
tajulafreen committed Jul 22, 2024
commit 04d8a8e04ba42b6e5342998082c9bd0683a2d7da
133 changes: 83 additions & 50 deletions Source-Code/AnalogWatch/style.css
Original file line number Diff line number Diff line change
@@ -1,65 +1,98 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background: #f0f0f0;
margin: 0;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: #2a083d;
z-index: -1;
}

.clock {
position: relative;
width: 300px;
height: 300px;
border: 10px solid #333;
border-radius: 50%;
background: white;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
width: 350px;
height: 350px;
background: url("./assets/clock.png");
background-size: cover;
display: flex;
justify-content: center;
align-items: center;
border-radius: 50%;
border: 4px solid #091921;
box-shadow:
0 -15px 15px rgba(255, 255, 255, 0.25),
inset 0 -15px 15px rgba(255, 255, 255, 0.05),
0 15px 15px rgba(0, 0, 0, 0.3),
inset 0 15px 15px rgba(0, 0, 0, 0.3);
}

.hand {
position: absolute;
background: #333;
border-radius: 50%;
transform-origin: bottom;
transform: rotate(90deg);
transition: transform 0.5s cubic-bezier(0.4, 2.3, 0.3, 1);
.clock::before {
content: "";
position: absolute;
width: 15px;
height: 15px;
background: #848484;
border: 2px solid #fff;
z-index: 10;
border-radius: 50%;
}

.hour {
width: 6px;
height: 80px;
left: 50%;
top: 50%;
transform: translateX(-50%);
background: #333;
.hour,
.min,
.sec {
position: absolute;
}

.hour,
.hr {
width: 160px;
height: 160px;
}

.min,
.mn {
height: 190px;
}


.hr,
.mn,
.sc {
display: flex;
justify-content: center;
border-radius: 50%;
}

.minute {
width: 4px;
height: 110px;
left: 50%;
top: 50%;
transform: translateX(-50%);
background: #666;
.hr::before {
content: "";
position: absolute;
width: 8px;
height: 80px;
background: #848484;
z-index: 1;
border-radius: 6px 6px 0 0;
}

.second {
width: 2px;
height: 120px;
left: 50%;
top: 50%;
transform: translateX(-50%);
background: red;
.mn::before {
content: "";
position: absolute;
width: 4px;
height: 90px;
background: #d6d6d6;
z-index: 2;
border-radius: 6px 6px 0 0;
}

.center {
position: absolute;
width: 14px;
height: 14px;
background: #333;
border-radius: 50%;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
.sc::before {
content: "";
position: absolute;
width: 2px;
height: 150px;
background: #ff6767;
z-index: 3;
border-radius: 6px 6px 0 0;
}