์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
- ์ฝ๋ฉ๋ ํ
- tanstack-query
- ๋ฐ๋๋ผ JS๋ก ํฌ๋กฌ ์ฑ ๋ง๋ค๊ธฐ
- typescript
- JAVA Script
- queryprovider
- JS
- ํ๋ก ํธ์๋
- canvas js
- ๋ฐ๋๋ผ JS๋ก ๊ทธ๋ฆผํ ๋ง๋ค๊ธฐ
- ์ฝ๋ฉ์ผ๊ธฐ
- canvas image
- axios-mock-adapte
- canvas
- negative margin
- ์น ๋ธ๋ผ์ฐ์ ๋ ๋๋ง
- clone coding
- CSS
- jest
- ๋ ธ๋ง๋ ์ฝ๋
- next.js
- tailwindcss
- javascript
- ๋ ธ๋ง๋์ฝ๋
- ์ฝ์ฝ์ํก ํด๋ก ์ฝ๋ฉ
- ์ํ์ฝ๋ฉ
- HTML
- HTML ํ์ผ๊ตฌ์กฐ
- ์น ๋ธ๋ผ์ฐ์ ๊ตฌ์กฐ
- react
- Today
- Total
Coding Archive
๋ ธ๋ง๋ ์ฝ๋ - ์ฝ์ฝ์ํก ํด๋ก ์ฝ๋ฉ ์ฐ์ต(6) ๋ณธ๋ฌธ
๋ ธ๋ง๋ ์ฝ๋ - ์ฝ์ฝ์ํก ํด๋ก ์ฝ๋ฉ ์ฐ์ต(6)
์ฝ๋ฑ์ด 2022. 5. 19. 00:00CLONING TIME
33. Write Message Input
reply ์ฐฝ ๋ง๋ค๊ธฐ
2๊ฐ์ column์ผ๋ก ๊ตฌ์ฑ
โถ์ฒซ ๋ฒ์งธ๋ ํ๋ฌ์ค ์์ด์ฝ
โถ๋ ๋ฒ์งธ๋ ์ธํ, ์ด๋ชจ์ง, ๋ฒํผ
์ด๋ ๋ ๋ฒ์งธ column์ input์ width๋ฅผ ๋ํ์ฃผ๊ธฐ ์ํด์๋ ๋ถ๋ชจ์ธ ๋ column๊ณผ reply์ width๋ฅผ ์ฃผ์ด์ผ ํ๋ค.
๋ ๋ฒ์งธ column์์ ์ด๋ชจ์ง์ ๋ฒํผ์ ์ฎ๊ธฐ๊ธฐ ์ํด position: absolute; ๋ฅผ ์ฌ์ฉํ๋ค.
+)
๋๋น ๋ถ๋ถ์ด ์์ด์ 100%๋ผ๊ณ ๋งํ๊ธฐ ๋๋ฌธ์ ๋ถ๋ชจ ์ปจํ ์ด๋์ ๋๋น๊ฐ ํ์ํ์ง๋ง 300px ๋๋ 500px์ ๊ฐ์ด ์๋์ผ๋ก ์ ๋ ฅ ๋๋น๋ฅผ ์ค์ ํ๋ฉด ๋ถ๋ชจ ์ปจํ ์ด๋ ๋๋น๋ฅผ ์ค์ ํ ํ์๊ฐ ์๋ค.
34. Splash Screen part One
100vh๋ ํ๋ฉด ๋์ด์ 100%, 100vw๋ ํ๋ฉด ๋๋น์ 100%์ด๋ค.
100vh = The screen's height
100vw = The screen's width
100% = 100% of the PARENT
๋ชจ๋ layer์ ์๋ก ์ค๊ฒ ํ๊ธฐ ์ํด์ body๋ฅผ ๊ธฐ์ค์ผ๋ก position: absolute;
35. Splash Screen part Two
CSS์ keyframes ์ ๋๋ฉ์ด์ ์ผ๋ก splash ์ ๋๋ฉ์ด์ ์ ์ค ์๋ ์์ง๋ง, ์๋ฒฝํ๊ฒ ์์ด์ง ์ํ๋ฅผ ๋ง๋ค ์๋ ์๋ค.
→ CSS์์ visibility: hidden; ์ผ๋ก HTML์ ํ๋ฉด, ๋ง์ฐ์ค๋ก๋ถํฐ ์จ๊ธธ ์๋ ์์ด๋ ์์ ํ ์ฌ๋ผ์ง๊ฒ ํ์ง ๋ชปํ๋ค.
(์ ๋ณด์ด๊ฒ ํ ์ ์์ง๋ง ์ค์ ๋ก๋ ์กด์ฌํ๊ณ ์๋ ์ํ์ด๊ธฐ ๋๋ฌธ์ ์์ ํ ์ฌ๋ผ์ง๊ฒ ํ๋ ค๋ฉด JavaScript๊ฐ ํ์ํ๋ค.)
@keyframes hideSplashScreen {
from {
opacity: 1;
}
to {
opacity: 0;
visibility: hidden;
}
}
์ ๋๋ฉ์ด์ ์ ๋ง์ง๋ง ๊ฐ์ ๊ธฐ์ตํ๊ณ ์ถ๋ค๋ฉด forwards๋ผ๋ ๋จ์ด๋ฅผ ์ฌ์ฉํด์ผ ํ๋ค.
→ ๋ง์ง๋ง keyframes๋ฅผ ๊ธฐ์ตํ๋ค.
animation-delay: 2s; ๋ฅผ ์ด์ฉํด ์ ๋๋ฉ์ด์ ์์์ 2์ด๊ฐ ์ง์ฐ์ํฌ ์ ์๋ค.
#splash-screen {
background-color: var(--yellow);
position: absolute;
height: 100vh;
width: 100vw;
top: 0;
display: flex;
justify-content: center;
align-items: center;
font-size: 132px;
animation: hideSplashScreen 0.3s ease-in-out forwards;
animation-delay: 2s;
}
36. Navigation Animation
์ ๋๋ฉ์ด์ ์ ์ด์ฉํด nav-bar ๋์์ธ
@keyframes notificationAnimation {
0% {
transform: none;
}
50% {
transform: translateY(-5px) rotateY(360deg);
}
100% {
transform: none;
}
}
.nav__notification {
position: absolute;
left: 15px;
bottom: 15px;
animation: notificationAnimation 2s ease-in-out infinite;
}
@keyframes appearBtnAnimation {
from {
opacity: 0;
}
to {
opacity: 1;
transform: none;
}
}
.nav__btn {
opacity: 0;
transform: translateY(50px);
animation: appearBtnAnimation 0.3s ease-in-out forwards;
}
.nav__btn:nth-child(2) {
animation-delay: 0.2s;
}
.nav__btn:nth-child(3) {
animation-delay: 0.4s;
}
.nav__btn:last-child {
animation-delay: 0.6s;
}
37. More Animations
.screen-header__icons .fa-cog๋ผ๊ณ ์ ๋ ์ด์ : ๊ทธ๋ฅ fa-cog๋ก ์ ์ผ๋ฉด ์ด ์์ด์ฝ์ด ๋ค์ด๊ฐ ๋ชจ๋ ๊ณณ์ ์ ์ฉ์ด ๋๊ธฐ ๋๋ฌธ์!
.screen-header__icons .fa-cog:hover {
animation: rotateCog 1s linear infinite;
}
will-change๋ ์ ๋๋ฉ์ด์ ์ด ์ข ๋ ๋ถ๋๋ฝ๊ฒ ๋์ํ ์ ์๊ฒ ํ๋ค.
→ ๋ธ๋ผ์ฐ์ ์๊ฒ ์ด๋ค ๊ฒ์ด ๋ณํ ๊ฒ์ธ์ง ์๊ณ ํด์ฃผ๋ ๊ฒ! ๋ฌธ์ ์์ด ์ ๋๋ฉ์ด์ ์ด ์๋๋๋ ๊ฒฝ์ฐ์ will-change๋ฅผ ๊ตณ์ด ์ฌ์ฉํ์ง ์์๋ ๋๋ค.
38. Animating Chats Screen
.reply:focus-within๋ "reply ๋ด๋ถ์ ์ด๋ค element๊ฐ focus ๋์ด ์๋ค๋ฉด"์ด๋ผ๋ ๋ป
visibility: hidden์ ์์ ํด๋ฆญ์ด ์๋๊ฒ ํ๋ค. / opacity: 0์ ํฌ๋ช ํด์ง์ง๋ง ํด๋ฆญ์ด ๋๊ฒ ํ๋ค.
39. Recap
.reply:focus-within input {
width: 96vw;
transform: translateX(-13%) translateY(-80px);
→
.reply input:focus {
width: 96vw;
transform: translateX(-13%) translateY(-80px);
40. No Mobile Media Query
ํฐ ํ๋ฉด ์ ์ ๋ฐฉ์ง (media query ์ฌ์ฉ)
#no-mobile {
position: absolute;
z-index: 99;
height: 100vh;
width: 100vw;
background-color: var(--yellow);
display: flex;
justify-content: center;
align-items: center;
top: 0;
font-size: 32px;
}
@media screen and (max-width: 645px) {
#no-mobile {
display: none;
}
}
๊ฐ์ธ์ ์ธ ์ฌ์ ์ผ๋ก ๊ฑฐ์ ํ ๋ฌ ๋์ ์ฝ๋ฉ ๊ณต๋ถ๋ฅผ ๋ชปํ๋ค. ๊ทธ๋์ ์ตํ๋ ๊ฐ์ด ๋ง์ด ์ฌ๋ผ์ง ๋๋์ด๋ค... ํ ๋ฌ ์ ์ ๋๋ธ ํ๋ก์ ํธ๋ฅผ ์ด์ ์์ ์ ๋ฆฌํ๋ค ๋ณด๋ ๊ต์ฅํ ํท๊ฐ๋ฆฐ๋ค. ์ญ์ ๊พธ์คํ ํ๋ ๊ฒ ์ ์ผ ์ค์ํ๋ค๋ ๊ฒ์ ๋ค์ ํ๋ฒ ๋๊ผ๋ค..!
'๐ฅ๏ธ Clone Coding' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
๋ ธ๋ง๋ ์ฝ๋ - ๋ฐ๋๋ผ JS๋ก ํฌ๋กฌ ์ฑ ๋ง๋ค๊ธฐ(5) (0) | 2022.06.09 |
---|---|
๋ ธ๋ง๋ ์ฝ๋ - ์ฝ์ฝ์ํก ํด๋ก ์ฝ๋ฉ ์ฐ์ต(7) (0) | 2022.05.20 |
๋ ธ๋ง๋ ์ฝ๋ - ์ฝ์ฝ์ํก ํด๋ก ์ฝ๋ฉ ์ฐ์ต(5) (0) | 2022.04.23 |
๋ ธ๋ง๋ ์ฝ๋ - ์ฝ์ฝ์ํก ํด๋ก ์ฝ๋ฉ ์ฐ์ต(4) (0) | 2022.04.21 |
๋ ธ๋ง๋ ์ฝ๋ - ์ฝ์ฝ์ํก ํด๋ก ์ฝ๋ฉ ์ฐ์ต(3) (0) | 2022.04.19 |