๐์ด๋ฒ์ฃผ ํ์ต ๋ชฉํ
- ์น ํ๋ก๊ทธ๋๋ฐ ๊ธฐ์ด ๋ฐฐ์ฐ๊ธฐ
- HTML/CSS ๋ก ์น์ฌ์ดํธ ์ ์ํ๊ธฐ
- ๋ฆฌ๋ ์ค์ ๋ํด ๊ณต๋ถํ๊ธฐ
- Git ์ ๋ํด ๊ณต๋ถํ๊ธฐ
์ค๋ ๋ฐฐ์ด ๋ด์ฉ ๐ช
- html, css ํ์ตํ์ฌ ์น์ฌ์ดํธ ์ ์ํ๊ธฐ
๋ ์ด์์ ํํ์ ํ๊ธฐ ์ํด ์ฌ๋ฌ๊ฐ์ง ๋ฐฉ๋ฒ์ด ์์ง๋ง ์ต์ ๊ธฐ๋ฅ ๊ทธ๋ฆฌ๋!
๋ค์ด๋ณธ์ ๋ ์๊ณ ํ๋๋ฒ ๊ณต๋ถ๋ ํด๋ณด์์ง๋ง ์ธ์ผ์ด ์๊ฒ ์ง ์ถ์ด ๋๊ฐ ์ดํดํ๊ณ ๋์ด๊ฐ๋๋ฐ,
๊ทธ๋ฆฌ๋๋ฅผ ์ง์ํ๋๊ฒ 96% ๋ธ๋ผ์ฐ์ ๋ผ๊ณ ํ๋ ์ถฉ๋ถํ ์ค๋ฌด์์๋ ์จ๋ ๋ ๊ฑฐ ๊ฐ๊ณ
์ด์ฐธ์ ์ ๋๋ก ๊ณต๋ถํ๊ณ ์ดํดํ๊ณ ๋์ด๊ฐ์!
<div class="container">
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
</div>
.container{
display: grid;
grid-template-columns: 1fr 1fr 1fr;
/* grid-template-columns: repeat(3, 1fr); */
grid-template-rows: 100px 500px;
}
์ง๊ธ๊น์ง html, css ์์ ํ ๋๋ ๋์ ์ธ ์์๋ฅผ ๋ฃ์ง ์์์ด์ ์ ์ฌ์ฉ ํด๋ณธ์ ์๋ ์์ฑ์ด์ฌ์ ์ ๊ฒฝ์จ์ ์ ์ดํดํ๊ณ ๋์ด๊ฐ์ผ๊ฒ ๋ค ์๊ฐํ๋ค. ๋ง์ฝ ์ฒ์ ์ ํ์๋ ๋ถ์ด๋ผ๋ฉด transform, translate, transition, animation ์ด๋ฆ ๋ ๋น์ทํ๊ณ ์ด๋์ ์์ฑ์ ๋ฃ์ด์ผ ํ๋์ง๋ ๊ฝค๋ ํท๊ฐ๋ ธ๊ธฐ ๋๋ฌธ์ ๋ค์ ํ๋ฒ ์ ๋ฆฌ ํ๊ณ ๊ฐ๋ฉด ์ข์๊ฑฐ ๊ฐ๋ค!
๋จผ์ ! ์ด๋ฆ์ด ๋น์ทํ๋๊น ์ฉ์ด ์ ๋ฆฌ๋ถํฐ ํ์คํ๊ฒ!
transform - ์์์ ๋ชจ์, ์์น, ํฌ๊ธฐ๋ฅผ ๋ฐ๊ฟ์ ์๋ ์์ฑ
transition - ์ ํด์ง ์๊ฐ๋์ ์์์ ์์ฑ๊ฐ์ ๋ถ๋๋ฝ๊ฒ ๋ณํ ์ํค๋ ์์ฑ
animation - ์์์ ํ์ฌ ์คํ์ผ์ ๋ค๋ฅธ ์คํ์ผ๋ก ์ฒ์ฒํ ๋ณํ์ํค๋ ์์ฑ
ํด๋น html์์์ transform์์ฑ์ ์ง์ ํ๋๊ฑธ๋ก ๋ณํ ๋ ๋ชจ์์ ์์๋ฅผ ๋ณผ ์ ์๋ค.
/* transition ์์ฑ ์์ฑ ๋ฌธ๋ฒ */
.transition {
transition-property: all;
transition-duration: 1000ms;
transition-timing-function: linear;
transition-delay: 3000ms;
}
/* ๋ง์ฐ์ค๋ฅผ ํธ๋ฒํ๋ฉด ์๊น์ด ๋ฐ๋๋ ์์ง์์ ์ค์ ํ๋ ์์ ๋ก ์์๋ณด์ */
.box1 {
color: blue;
transition: color 0.3s linear;
}
.box1:hover{
color: red;
}
// 0.3์ด ๋์ ์๊น์ด blue ์์ red๋ก ์ผ์ ํ ์๋๋ก ๋ถ๋๋ฝ๊ฒ ๋ณํ
/* animation ์์ฑ ์์ฑ ๋ฌธ๋ฒ */
.animation{
animation-name: makeAnimationName;
animation-duration: 5s;
animation-timing-function: linear;
animation-delay: 1s;
animation-iteration-count: infinite;
animation-direction: alternate;
}
@keyframes makeAnimationName{
from{ width: 300px }
to{ width: 600px }
}
/* ํฌ๊ธฐ๊ฐ ๋ณํ๋ ์์ง์์ ์ค์ ํ๋ ์์ ๋ก ์์๋ณด์ */
.animation {
width: 300px;
height: 300px;
background-color:orange;
animation: changeWidth 3s linear 1s 6 alternate;
}
@keyframes changeWidth{
from{ width: 300px; }
to{ width: 600px; }
}
๋ฏธ๋์ด ์ฟผ๋ฆฌ๋ ๋ช๋ฒ ๋ค๋ค๋ณธ์ ์์ด์ ์์ํ์ง ์์์ง๋ง ์์๋ ์ฌ์ฉ์ ์ํ์ด์ ๋ค์ ์ฒดํฌ์ฒดํฌ ํ๊ณ ๋์ด๊ฐ๊ธฐ!
<head>
<meta name="viewport" content=โwidth=device-width, initial-scale=1.0โ>
</head>
@media (min-width: 320px) and (max-width: 640px){
.media{
//์ํ๋ ๋ด์ฉ ์
๋ ฅ
}
}