TIL
20230427 TIL
๊น๋นต๊ทธ
2023. 4. 27. 20:30
๐ Today ์์ฝ
1. ์์ > ์ ์ round(๋ฐ์ฌ๋ฆผ), ceil(์ฌ๋ฆผ), floor(๋ด๋ฆผ)
2. js์์ ํ๊ทธ ์ถ๊ฐ์ document.createElement(ํ๊ทธ๋ช )
3.
๐ 1. ์ํ ์
[โ ] ์ฝ๋ฉํ ์คํธ ๊ธฐ์ด 3๋ฌธ์
[โ ] js ๋ณต์ต 6.0-6.2
[โ ] js ์ฑ๋ฆฐ์ง ์ ์ถ
โ๏ธ 2. ๊ฐ์ ์
์ค์ํ๊ฑด.. ์ง์น์ง ์๋ ๋ง์.. ! ์ผ๋๋ฌธ์ ๋๋ฌด ๋ฐ๋น ์ ์๊ฐ ์์ง๋ง ์กฐ๊ธ์ด๋ผ๋ 10๋ถ์ด๋ผ๋ ํด์ผ์ง!!
์ฑ๋ฆฐ์ง ๊ณต๋ถ ๊พธ์คํ ๊ฐ๋ณด์๊ณ !!

๐ 3. ๋ฐฐ์ด ์
1) ์์๋ฅผ ์ ์๋ก
1. Math.round() ๋ฐ์ฌ๋ฆผ
Math.round(1.1) ///1
Math.round(1.7) ///2
2.Math.Ceil() ์ฌ๋ฆผ
Math.ceil(0.95) ///1
Math.ceil(7.002) /// 8
3.Math.floor() ๋ด๋ฆผ
Math.floor(5.95) /// 5
Math.floor(-5.05) /// -6
2) CSS background gradients
.horizontal-gradient {
background: linear-gradient(to right, blue, pink);
}
.simple-linear {
background: linear-gradient(blue, pink);
}
Using CSS gradients - CSS: Cascading Style Sheets | MDN
CSS gradients are represented by the <gradient> data type, a special type of <image> made of a progressive transition between two or more colors. You can choose between three types of gradients: linear (created with the linear-gradient() function), radial
developer.mozilla.org
3) js์ style bg gradients ์ถ๊ฐํ๊ธฐ
body.style.background = `linear-gradient(to right, red, blue)`;