Skip to content

Commit 85a6da0

Browse files
committed
refactor: change names & popup animation
1 parent 4f71e9d commit 85a6da0

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
<img id="profilePicture" src="https://avatars0.githubusercontent.com/u/43749971" alt="Profile Picture">
2222
</a>
2323

24-
<div class="popup" id="popup">
25-
<div class="popup-inner">
24+
<div class="overlay" id="popup">
25+
<div class="popup">
2626
<div class="popup-photo">
2727
<img src="https://avatars0.githubusercontent.com/u/43749971" alt="Profile Picture">
2828
</div>

style.css

+8-6
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ body {
130130

131131
/*-------------------------popup------------------------*/
132132
/* credits: https://www.youtube.com/watch?v=lAS2glU0xlc */
133-
.popup {
133+
.overlay {
134134
display: flex;
135135
align-items: center;
136136
justify-content: center;
@@ -147,9 +147,9 @@ body {
147147
transition: .5s ease-in-out;
148148
}
149149

150-
.popup-inner {
150+
.popup {
151151
position: relative;
152-
bottom: -100vw;
152+
/* top: -100vw; */
153153
/* right: -100vh; */
154154
display: flex;
155155
align-items: center;
@@ -159,6 +159,7 @@ body {
159159
height: 80%;
160160
background-color: var(--accentColor);
161161
/* transform: rotate(32deg); */
162+
transform: scale(0);
162163
transition: .5s ease-in-out;
163164
}
164165

@@ -199,13 +200,14 @@ body {
199200
line-height: 1.5;
200201
}
201202

202-
.popup:target {
203+
.overlay:target {
203204
visibility: visible;
204205
opacity: 1;
205206
}
206207

207-
.popup:target .popup-inner {
208-
bottom: 0;
208+
.overlay:target .popup {
209+
transform: scale(1);
210+
/* top: 0; */
209211
/* right: 0; */
210212
/* transform: rotate(0); */
211213
}

0 commit comments

Comments
 (0)