kokoa clone-4
kokoa clone-4
chat, Splash, Navi-Ani Part
6.33
Chat Screen - reply bar
-
column ๋ด์ โinput ์ฐฝโ + โ์ด๋ชจํฐ, ํ๋ฌ์ค ์ฐฝโ์ด ๋ค์ด๊ฐ์ ๋, ๋ฐ์ค์ ํฌ๊ธฐ๋ฅผ ํ๋ฉด์ ๋ง์ถ๊ธฐ ์ํด ์ ์ฒด์ ์ธ column์ width๊ฐ์ ํ์ ํด์ ๋ถํ ์ ํ ๋ค์ ์์ชฝ column์ ๋ถํ ํ๋ค.
-
position : relative์ absolute ์ด์ฉํด์ ๋ฐ์ค ์์ ๋ฐ์ค๋ฅผ ์์น์ํฌ ๋, ์กฐ์ ํ๊ธฐ
6.34 ~ 6.35
Splash Screen
- ์น์ ์คํํ์ ๋ ๋ณด์ด๋ ๊ฐ์ฅ ์ฒซ ํ๋ฉด์ด๋ค.
- splash ํ๋ฉด์ ๋ค ๋ง๋ ํ์ animation์ ์ด์ฉํ๋ฉด, Keyframe์ ํน์ฑ์ ๋ค์ ๋์์ค๊ฒ ๋๋ค. ( from ~ to ~ )
forwards ๋ผ๋ ํน์ฑ์ animation ๋ค์ ๋ถ์ด๋ฉด ๋ค์ ๋์์ค์ง ์๋๋ค.
style{ animation: hideSplashScreen 1s ease-in-out forwards; }
- ๋ฌธ์ ๋ ๋ง์ง๋ง key frame์ ์ตํด์ html ์์๋ element๊ฐ ์์ง ๋จ์์๋ค.
- visibility : hidden ์ด๋ฅผ ์ฐ๋ฉด ํด๋ฆญ์ ํ ์ ์๋ค. ํ์ง๋ง ๋์๋ง ๋ณด์ด์ง ์์ ๋ฟ ์ฌ๋ผ์ง์ง ์๋๋ค. ๋ต์? JavaScript๋ฅผ ์ด๋ค.! animation-delay : animation์ ์ ๊น ๋ฉ์ถ๊ฒ ํ๋ค.
6.36 ~ 6.37
Navigation Bar - Animation
- ๋์ ๊ตด๋ฆฌ๊ธฐ
- ๋ด๋น๊ฒ์ด์ ๋ฐ ์๋์์ ์ฌ๋ผ์ค๊ฒ ๋ง๋ค๊ธฐ
- ํฑ๋๋ฐํด ๊ตด๋ฆฌ๊ธฐ
- ํํธ ๋ฐ๊ฒ ํ๊ธฐ -> ํ๋ค๋ฆด๋..?
will-change: transform;
6.38
Chat screen
-
Fade-In ๊ธฐ๋ฒ ์ฌ์ฉํ๊ธฐ.
@keyframes fadeIn { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
- chat ๋ด์ reply๋ฐ์์ Input์ focus๊ฐ ๋์ ๋,
focus-within :
์ํ๋ ํด๋์ค ๋ด๋ถ์ focus๋ฅผ ๋ฐ์ ํ์ ๋ค๋ฅธ ํด๋์ค๋ฅผ ๋์์ํค๊ณ ์ถ์ ๋
.reply:focus-within .reply__column:first-child { opacity: 0; }
- ๋ฌธ์ : ์ ๋๋ฉ์ด์
์ ํ๋๋ฐ ์ ์ด button ์ด ์๊พธ ๋ฐ์์ ๋ฉ์นซ ๊ฑฐ๋ฆฌ๋ค๊ฐ ์ฌ๋ผ์ง๋ ํ์์ ๋ณผ ์ ์์๋ค.
์ด ํ์์ ์ฌ๋ผ์ง๊ฒ ํ๊ธฐ ์ํด, ์ฝ๋๋ฅผ ์ดํด๋ดค์ง๋ง ์๋ฌด๊ฒ๋ ๋ชป ์ฐพ์๋ค.
ํด๊ฒฐ : width ๊ฐ์ด ๋ฐ๋ ๋, ์์น๊ฐ ๋ณ๊ฒฝ๋๋ ๊ฒ์ ๋ณด๊ณ position์ ๋ฌธ์ ๊ฐ ์๋ ๊ฒ์ ๋ดค๋ค. (ํ 30๋ถ์ ์ณ๋ค๋ณธ๋ฏ.. ) absolute position์ ์ ํด์ฃผ๋ฉด relative position์ ๋ํด ์์น๋ฅผ ์ง์ ํด์ฃผ์. top:0px right:0px
++ chat ํ๋ฉด ๋ด์ ์ฑํ ์๋ค, ์ฑํ ๋ฐ fade In ๊ฐ๋ฅํ๊ฒ ๋ง๋ฌ
tip
animation: hideSplashScreen 1s ease-in-out forwards;
will-change : transform;
animation-delay : animation์ ์ ๊น ๋ฉ์ถค.
focus-within : ํด๋์ค ๋ด๋ถ์ focus๋ฅผ ๋ฐ์ ํ์ ๋ค๋ฅธ ํด๋์ค ๋์