will-change, Focus-inside, transition
2022. 9. 29. 19:37ใcss
๐ Will-change
๊ธฐ๋ณธ์ ์ผ๋ก ๋ธ๋ผ์ฐ์ ์๊ฒ "๋ญ๊ฐ ๋ฐ๋ ๊ฒ ์ด๋ค" ๋งํด์ค๋ค.
๋ธ๋ผ์ฐ์ ๋ ์ ๋๋ฉ์ด์ ์ ๋ ๋์์ง๊ฒ ํ๋ค. (๋ธ๋ผ์ฐ์ ์๊ฒ ๋ ๋๋ง ํํธ๋ฅผ ์ค๋ค.)
Element์ ์คํ๋๊ธธ ๊ธฐ๋ํ๋ ๋ณํ๋ฅผ ๋ช ์ํจ.
Will-change๋ ๊ทธ๋ํฝ์นด๋๋ฅผ ์ด์ฉํด์ ์ ๋๋ฉ์ด์ ์ ๊ฐ์ํํ๋ค
๐ Focus-inside
๋ด๋ถ์ ์ผ๋ก focus๋ element๊ฐ ์๋์ง ์ ์ ์๋๋ก ํด์ค๋ค.
Ex) rely:focus-within
reply ๋ด๋ถ์ ์ด๋ค element๊ฐ focus๋์ด ์๋ค๋ฉด ์ด๋ผ๋ ๋ป
.reply:focus-within .reply__column:first-child {
display: none;
}โ
์ค๋ช : reply ์์ reply__column:first-child ๊ฐ ์๋ค๋ฉด display๋ none์ด ๋๋ค๋ ๋ป
๐ Transition
transition: all
์ ์ฉํ element์ ์์ฑํ๋ฉด ๋ถ๋๋ฝ๊ณ ์์ฐ์ค๋ฝ๊ฒ ํ๋ํ๋ค..
'css' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
์ปดํจํฐ๊ฐ ์ฝ๋๋ฅผ ์ฝ๋ ์์๋ฅผ ์ดํดํ๊ณ ์ ์ฉํด๋ณด๊ธฐ (0) | 2022.09.27 |
---|---|
Order, flex-direciton, > (0) | 2022.09.27 |
์๋ฌธ์๋ฅผ ๋๋ฌธ์๋ก, ์ด์ ํ์ด์ง, z-index, border-radious (0) | 2022.09.26 |
Position: fiexd, border box์ padding (1) | 2022.09.22 |
navigation bar, vsc๋จ์ถํค(shortcut) (1) | 2022.09.22 |