๐ฉ๐ป๐ปSTUDY (78) ์ธ๋ค์ผํ ๋ฆฌ์คํธํ [jQuery] e.target / e.currentTarget / $(this) parent child ์ฐจ์ด๋ฅผ ๋ณด๊ธฐ ์ํด ๋จผ์ .parent ํด๋ฆญ! // jQuery $('.parent').on('click', function(e) { console.log('e.target', e.target); console.log('e.currentTarget', e.currentTarget); console.log('$(this)', $(this)); console.log('this', this); }); .child ํด๋ฆญ! // jQuery $('.parent').on('click', function(e) { console.log('e.target', e.target); console.log('e.currentTarget', e.currentTarget); console.log('$(this.. [CSS] flex ์์ฑ (flex-basis, flex-grow, flex-shrink) 1. flex-basis : ์์ดํ ์ ๊ธฐ๋ณธํฌ๊ธฐ ๊ธฐ๋ณธ๊ฐ auto #container { display: flex; max-width: 800px; margin: auto; border: 3px solid #000; background-color: #fff; } .item { font-size: 40px; flex-basis: auto; } #container { /* ์์ ๋์ผ */ } .item { font-size: 40px; flex-basis: 120px; } 2. flex-grow : ์์ดํ ์ ๋๋น ๋น์จ ๊ธฐ๋ณธ๊ฐ 0 flex-grow ๊ฐ์ด 1์ด๋ฉด 1:1 ๋น์จ๋ก ๋ง์ถฐ์ง๋๊ฒ ์๋๋ผ ์ฌ๋ฐฑ์ ๊ธฐ์ค์ผ๋ก ๋น์จ์ด ๋ง์ถฐ์ง๋ ๊ฒ์ด๋ค. .item { flex-grow: 1; } ๋๋น๋ฅผ ๋๊ฐ์ด ๋ํ๋ด๊ณ ์ถ์ ๋๋, ... [CSS] flex-basis vs width ์ฐจ์ด์ flex-basis๊ฐ ํญ์ width์ ์ ์ฉ๋๋ ๊ฒ์ ์๋๋ค. flex-direction: row์ธ ๊ฒฝ์ฐ, flex-basis ๋ ๋๋น๋ฅผ ์ ์ดํ๋ค. ๊ทธ๋ฌ๋ flex-direction: column์ธ ๊ฒฝ์ฐ, flex-basis๋ ๋์ด๋ฅผ ์ ์ดํ๋ค. ์ฃผ์์ฐจ์ด์ flex-basis๋ flex item๋ง ์ ์ฉ๋๋ค. flex container ๋ flex-basis ๋ฅผ ๋ฌด์ํ์ง๋ง width๋ height๋ ์ฌ์ฉํ ์ ์๋ค. flex-basis๋ ์ฃผ์ถ์์ ์๋ํ๋ค. ์๋ฅผ ๋ค์ด flex-direction: column์ ํ๋ ์ค ํญ๋ชฉ์ ํฌ๊ธฐ๋ฅผ ๊ฐ๋ก๋ก ์กฐ์ ํ๋ ค๋ฉด width ์์ฑ์ด ํ์ํ๋ค. ์ ๋์์น์ ์๋ flex ํญ๋ชฉ์๋ ์ํฅ์ ์ฃผ์ง ์๋๋ค. #container { display: flex; flex-direction:.. [HTML] strong / b / em strong ํด๋น ์ฝํ ์ธ ์ ์ค์์ฑ์ด๋ ์ฌ๊ฐํจ, ๊ธด๊ธํจ ๋ฑ์ ๊ฐ์กฐํ ๋ ์ฌ์ฉ. ๋ธ๋ผ์ฐ์ ๋ ์ผ๋ฐ์ ์ผ๋ก ์์์ ์ฝํ ์ธ ๋ฅผ ๊ตต์ ํ ์คํธ๋ก ํํ. b HTML5์์ ์ ๋ชฉ(heading)์ ๋ถํฐ ํ๊ทธ๋ก, ๊ฐ์กฐ๋ ํ ์คํธ๋ ํ๊ทธ๋ก, ์ค์ํ ์๋ฏธ๋ฅผ ๊ฐ์ง๋ ํ ์คํธ๋ ํ๊ทธ ์ฌ์ฉ. ํ์ด๋ผ์ดํธ๋ ํ ์คํธ๋ ํ๊ทธ๋ก ํํ. ๋ฐ๋ผ์ ์์ ํ๊ทธ๋ค์์ ์ ์ ํ ํ๊ทธ๋ฅผ ์ฐพ์ ์ ์์ ๋๋ง ๋ง์ง๋ง ์ ํ์ง๋ก ํ๊ทธ ์ฌ์ฉ. em ๊ฐ์กฐ๋ ํ ์คํธ๋ฅผ ํํ. HTML5์์๋ ์ฌ์ ํ ์ง์, ๋์ CSS๋ฅผ ์ฌ์ฉํ๋ฉด ๋์ฑ ๋ค์ํ ํจ๊ณผ๋ฅผ ์ค ์ ์๋ค. strong vs b ์์๋ ํ ์คํธ ์์ฒด์ ์ฃผ์๋ฅผ ๋๊ธฐ ์ํด ์ฌ์ฉ, ์ ์์์ ์ฝํ ์ธ ์์ฒด์ ์ค์์ฑ ๊ฐ์กฐํ ๋ ์ฌ์ฉ. strong vs em ์์๋ ๊ตฌ์ด์ฒด ๊ฐ์กฐ์ ๊ฐ์ด ๋ฌธ์ฅ์ ์๋ฏธ๋ฅผ ๋ณ๊ฒฝํ๋๋ฐ ์ฌ์ฉ("I love c.. [HTML] abbr acronym abbr abbr ๋จ์ด์ ์ถ์ฝํ(abbreviation)์ด๋ ๋จธ๋ฆฌ๊ธ์๋ก๋ง ๋ ๋จ์ด(acronym)๋ฅผ ์ ์ํ ๋ ์ฌ์ฉ. ๋ธ๋ผ์ฐ์ ๋ ๋ฒ์ญ ์์คํ , ๊ฒ์ ์์ง์ ์ ์ฉํ ์ ๋ณด๋ฅผ ์ ๊ณต. ์์ ์์ ๋ง์ฐ์ค๋ฅผ ์ฌ๋ ค๋์ผ๋ฉด title ์์ฑ์ผ๋ก ๋ช ์ํ ๋จ์ด์ ์ํ์ด ๋ํ๋๋ค. IOC (๊ตญ์ ์ฌ๋ฆผํฝ ์์ํ)๋ ์ค์์ค ๋ก์์ ๋ณธ๋ถ๋ฅผ ๋ ๊ตญ์ ์คํฌ์ธ ๊ธฐ๊ตฌ์ด๋ค. acronym acronym ๋จธ๋ฆฌ๊ธ์๋ก๋ง ๋ ๋จ์ด(acronym)๋ฅผ ์ ์. ๋ ์ด์ ์ง์ํ์ง ์์ผ๋ฉฐ ๋์ ์์๋ฅผ ์ฌ์ฉํ๋ค. ์์ ์์ ๋ง์ฐ์ค๋ฅผ ์ฌ๋ ค๋์ผ๋ฉด title ์์ฑ์ผ๋ก ๋ช ์ํ ๋จ์ด์ ์ํ์ด ๋ํ๋๋ค. AJAX ๋ ๋น ๋ฅด๊ฒ ๋์ํ๋ ๋์ ์ธ ์น ํ์ด์ง๋ฅผ ๋ง๋ค๊ธฐ ์ํ ๊ฐ๋ฐ ๊ธฐ๋ฒ์ ํ๋์ ๋๋ค. [JavaScript] return์ด ํ๋ ์ผ ๊ฐ์ ๋ฐํํ๋๋ฐ ์ฌ์ฉ. ์ง์ญ๋ณ์์ ๊ฐ์ ์๋๋ฐ ์ฌ์ฉ. ํ์ฌ ์งํ์ค์ธ ํจ์๋ฅผ ์ค์ง(escape). 1. ๊ฐ์ ๋ฐํํ๋๋ฐ ์ฌ์ฉ + 2. ์ง์ญ๋ณ์์ ๊ฐ์ ์๋๋ฐ ์ฌ์ฉ. [์์ 1] var test = function() { var x = 1; } test(); console.log(test()); // undefined ์์ ํจ์๋ ์คํ๋์ง ์๋๋ค. ๋ด๋ถ ๊ตฌ๋ฌธ๋ค์ ์คํ(test())ํ์์ผ๋ ๋ฐํํ ๊ฐ์ด ์ ์ธ๋์ง ์์๋ค. x๋ฅผ ์ป๊ธฐ ์ํด์ return์ ์ฌ์ฉํ์ฌ ๊ฐ์ ๋ฐํํด์ผ ํ๋ค. var test = function() { var x = 1; return x; } var test2 = test(); console.log(test2); test() ํจ์๋ฅผ ์คํํ ๊ฒฝ์ฐ ํด๋นํจ์๋ 1์ ๋ฐํํ๋ค. ๋ฐํ๊ฐ์ ์ฌ์ฉํ๊ธฐ .. [CSS] ์นํฐํธ ์ฐธ๊ณ https://velog.io/@vnthf/%EC%9B%B9%ED%8F%B0%ED%8A%B8-%EC%B5%9C%EC%A0%81%ED%99%94-%ED%95%98%EA%B8%B0 ์นํฐํธ ์ต์ ํ ํ๊ธฐ ์นํฐํธ๋? ํฐํธ web safe font - ์ผ๋ฐ์ ์ผ๋ก ์์คํ ์ ์ค์น๋ ํฐํธ. ๋ค์ด๋ก๋ ์์ด ์ฌ์ฉ์์๊ฒ ์๋๋๋ก ํํ์ด ํ ์ ์์. (Arial, Helvetica ๋ฑ) web font - ์ค์น๋์ด ์์ง ์์์ ๋ธ๋ผ์ฐ์ ์์ ๋ค์ด๋ก๋ velog.io https://d2.naver.com/helloworld/4969726 [JS] script async/defer *parsing :: https://solog4something.tistory.com/13 (+)21.10.26 ์ถ๊ฐ ํ์ฑ์ ํด๋น ์ธ์ด์ ๋ฌธ๋ฒ๊ฒ์ฌ๊ธฐ๋ผ๊ณ ํ ์ ์๋ค. ๋คํธ์ํฌ๋ก ๋ฐ์ HTML๊ณผ CSS ํ์ผ์ ํ ํฐํ ์ํค๊ณ Parse Tree๋ฅผ ์์ฑํ๋ค. ์ด Parse Tree๋ฅผ DOM ํธ๋ฆฌ๋ก ๋ง๋ค์ด ๋ ๋ํ๊ฒ ๋๋ค. ํ์ง๋ง HTML์ ํ๋ฉด์ ๋ณด์ด๊ธฐ ์ํด ํ์ฑํ๋ ๋์ค์ ํ์ฑ์ ๋ฉ์ถ๋ ๊ฒฝ์ฐ๊ฐ ๋ฐ์ํ๋ค. ์๋ ์คํฌ๋ฆฝํธ๋ฅผ ๋ณด์. script ์๋ฐ์คํฌ๋ฆฝํธ๋ *parser blocking resource(ํ์ ์ฐจ๋จ ๋ฆฌ์์ค)์ด๋ค. ๊ธฐ๋ณธ ๋ชจ๋๋ก ๋ธ๋ผ์ฐ์ ๋ ๋ฌธ์๋ฅผ ํ์ฑํด ์ฝ๋ค๊ฐ ์๋ฐ์คํฌ๋ฆฝํธ๋ฅผ ๋ง๋๋ฉด ์งํํ๊ณ ์์๋ ํ์ฑ์ ๋ฉ์ถ๊ณ , ์คํฌ๋ฆฝํธ๋ฅผ ๋ค์ด > ํ์ฑ > ์คํ ํ ํ ๋ค์ HTML ๋ฌธ์๋ฅผ ํ์ฑํ๊ฒ ๋๋ค. ์คํฌ๋ฆฝํธ๋ .. ์ด์ 1 2 3 4 5 6 ยทยทยท 10 ๋ค์