๐ŸŽฏ

Bootstrap

0. ๋ถ€ํŠธ์ŠคํŠธ๋žฉ

๋ถ€ํŠธ์ŠคํŠธ๋žฉ์€ ์›น ํ”„๋ ˆ์ž„ ์›ค ์ž…๋‹ˆ๋‹ค. ํ”„๋ ˆ์ž„ ์›ค์€ ์ตœ์†Œํ•œ์˜ ์ž‘์—…์œผ๋กœ ๋น ๋ฅด๊ฒŒ ๊ฒฐ๊ณผ๋ฌผ์„ ๋งŒ๋“ค ์ˆ˜ ์žˆ๋„๋ก ๊ตฌ์ถ•ํ•ด ๋†“์€ ์ข…ํ•ฉ ๊ณต๊ตฌ ์„ธํŠธ๋ผ๊ณ  ์ƒ๊ฐํ•˜์‹œ๋ฉด ์‰ฝ์Šต๋‹ˆ๋‹ค.
๋ถ€ํŠธ์ŠคํŠธ๋žฉ์€ ํฐ ๋ชจ๋‹ˆํ„ฐ ํ™”๋ฉด์œผ๋กœ ๋ณด๋˜์ง€ ํœด๋Œ€ํฐ์ฒ˜๋Ÿผ ์ž‘์€ ํ™”๋ฉด์œผ๋กœ ๋ณด๋˜์ง€ ์ƒ๊ด€ ์—†์ด ์‚ฌ์šฉ์ž์˜ ์‹œ์ ์— ๋งž์ถฐ ์ตœ์ ํ™” ๋˜์–ด ํ™”๋ฉด์„ ๊ตฌ์„ฑํ•ฉ๋‹ˆ๋‹ค.ย ์ด๋ ‡๊ฒŒ ์‚ฌ์šฉ์ž์˜ ์‹œ์ ์— ๋งž์ถฐ ๊ตฌ์ถ•๋˜๋Š” ์‚ฌ์ดํŠธ๋ฅผ ๋ฐ˜์˜ํ˜• ์‚ฌ์ดํŠธ๋ผ๊ณ  ํ•˜๋Š”๋ฐ ๋ถ€ํŠธ์ŠคํŠธ๋žฉ์€ ๋ฐ˜์‘ํ˜• ์‚ฌ์ดํŠธ๋ฅผ ๊ตฌ์ถ•ํ•˜๊ธฐ์— ์ตœ์ ํ™” ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.
๋ถ€ํŠธ์ŠคํŠธ๋žฉ์€ form, button, table, navigator๊ฐ€ HTML, CSS๋กœ ๋ฏธ๋ฆฌ ๋””์ž์ธ ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ๋ถ€ํŠธ์ŠคํŠธ๋žฉ 3์—์„œ ์‚ฌ์šฉํ•˜๋˜ ๋Œ€๋ถ€๋ถ„์˜ ํƒœ๊ทธ๋“ค์ด ๊ทธ๋Œ€๋กœ ์‚ด์•„์žˆ์ง€๋งŒ ๋งŽ์€ ๋ถ€๋ถ„์ด ๋ฐ”๋€Œ์—ˆ๊ธฐ ๋•Œ๋ฌธ์— ์ƒˆ๋กœ ๊ณต๋ถ€๋ฅผ ํ•˜์…”์•ผ ํ•ฉ๋‹ˆ๋‹ค.
๋ถ€ํŠธ์ŠคํŠธ๋žฉย 4๊ฐ€ ๋‚˜์˜จ์ง€ ๋ฒŒ์จ 2๋…„์ด ๋„˜์—ˆ๊ณ , ์ด์ œ ๋ถ€ํŠธ์ŠคํŠธ๋žฉ ๊ณต์‹ ๋ฒ„์ „(21๋…„)์€ 5๋กœ ๋„˜์–ด๊ฐ”์Šต๋‹ˆ๋‹ค. ๊ทธ๋Ÿผ์—๋„ ์‹œ์ค‘์—๋Š” ๋ถ€ํŠธ์ŠคํŠธ๋žฉ 3 ์ฑ…์ด ์žˆ๊ณ , ๊ตฌ๊ธ€์—์„œ ํ•œ๊ตญ์–ด๋กœ ๋ถ€ํŠธ์ŠคํŠธ๋žฉ์„ ๊ฒ€์ƒ‰ํ•˜๋ฉด ์•„์ง๋„ 3.0 Ver ๋ฒˆ์—ญ ํŽ˜์ด์ง€๊ฐ€ ๋‚˜์˜ค๊ธฐ์— Version์— ์œ ์˜ํ•˜์…”์„œ ๊ฐœ๋ฐœ์„ ํ•˜์…”์•ผ ํ•ฉ๋‹ˆ๋‹ค.
bootstrap4์™€ bootstrap5์˜ ๊ฐ€์žฅ ํฐ ์ฐจ์ด๋Š” JQeury๊ฐ€ ์—†์–ด์กŒ๋‹ค๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค.
ย 

1. ๋ถ€ํŠธ์ŠคํŠธ๋žฉ ์ ์šฉ

https://getbootstrap.com/์—์„œ ๋‹ค์šด๋กœ๋“œ ๋ฐ›์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
โ€ข ์‹ค์Šต์€ ๋‹ค์šด๋กœ๋“œ๋ฅผ ๋ฐ›์ง€ ์•Š๊ณ  ์ง„ํ–‰ํ•˜๋‹ˆ ๋‹ค์šด๋กœ๋“œ๋ฅผ ์•ˆ๋ฐ›์œผ์…”๋„ ๋ฉ๋‹ˆ๋‹ค
ย 
- ์˜๋ฌธ ํ™ˆํŽ˜์ด์ง€ : https://getbootstrap.com/(Ver 5.0.0 )
notion imagenotion image
๋ถ€ํŠธ์ŠคํŠธ๋žฉ์„ ์ด์šฉํ•œ๋‹ค๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์—ฌ๋Ÿฌ ๋ ˆ์ด์•„์›ƒ์„ ๋งŒ๋“ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋ถ€ํŠธ์ŠคํŠธ๋žฉ ๊ณต์‹ ํ™ˆํŽ˜์ด์ง€์—์„œ Examplesย ํƒญ์—์„œ ๋‹ค์–‘ํ•œ ๋ ˆ์ด์•„์›ƒ์„ ํ™•์ธํ•ด๋ณด์„ธ์š”!
์œ ๋ฃŒ ํ…œํ”Œ๋ฆฟ ์‚ฌ์ดํŠธ๋Š” https://wrapbootstrap.com/ ๋ฅผ ์ฐธ๊ณ ํ•ด๋ณด์„ธ์š”.
ย 
notion imagenotion image
ย 
ย 
notion imagenotion image
ย 
์ž, ์ด์ œ ๋ถ€ํŠธ์ŠคํŠธ๋žฉ์„ ์ ์šฉ์‹œ์ผœ ๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ž‘์„ฑํ•˜์‹  ๋‹ค์Œ 001.html๋กœ ์ €์žฅํ•ด์ฃผ์„ธ์š”. ํ•ต์‹ฌ์ ์ธ ์ฝ”๋“œ๋งŒ ๋„ฃ์–ด๋‘์—ˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋‹ค์Œ ๋ฒ„์ „์—์„œ๋Š” jQuery๊ฐ€ ์—†์–ด์ง€๋‹ˆ ์ด ์ ๋„ ์œ ๋…ํ•ด์ฃผ์„ธ์š”.
ย 
์•„๋ž˜ ์ฝ”๋“œ ์ž‘์„ฑ ์‹œ์ ์€ 21๋…„ 1์›” 27์ผ์ž…๋‹ˆ๋‹ค. ์ด ๋ฒ„์ „์ด ๋„ˆ๋ฌด ์˜ค๋ž˜๋˜์—ˆ๋‹ค๋ฉด notion์—์„œ commet ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค.
<!doctype html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Bootstrap CSS --> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet"> <title>Hello, world!</title> </head> <body> <h1>Hello, world!</h1> <!-- Optional JavaScript; choose one of the two! --> <!-- Option 1: Bootstrap Bundle with Popper --> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js"></script> <!-- Option 2: Separate Popper and Bootstrap JS --> <!-- <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.4/dist/umd/popper.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.min.js"></script> --> </body> </html>

2. ๊ทธ๋ฆฌ๋“œ

์ฒ˜์Œ์—๋Š” ๊ทธ๋ฆฌ๋“œ ์‹œ์Šคํ…œ์— ๋Œ€ํ•ด ์•Œ์•„๋ณผ ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์•„๋ž˜ ๊ณต์‹ ํ™ˆํŽ˜์ด์ง€ ๊ธ€์—๋„ ๋‚˜์™€ ์žˆ๋Š” ๊ฒƒ์ฒ˜๋Ÿผ ๋ถ€ํŠธ์ŠคํŠธ๋žฉ์€ ์ „์ฒด ํ™”๋ฉด์„ 12๊ฐœ์˜ ์ปฌ๋Ÿผ์œผ๋กœ ๋‚˜๋ˆ ๋†“์•˜์Šต๋‹ˆ๋‹ค. ๊ทธ ๋‚˜๋ˆ ๋†“์€ ์ปฌ๋Ÿผ์— ๋ฌด์—‡์„ ๋ฐฐ์น˜ํ•  ๊ฒƒ์ธ์ง€ ์šฐ๋ฆฌ๊ฐ€ ์ •ํ•ด์„œ ํ™ˆํŽ˜์ด์ง€๋ฅผ ๋งŒ๋“ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ปฌ๋Ÿผ 12๊ฐœ๊ฐ€ ๋ชจ์—ฌ ํ•˜๋‚˜์˜ row๊ฐ€ ๋ฉ๋‹ˆ๋‹ค.
ย 
notion imagenotion image
์•ž์„œ ๋ง์”€๋“œ๋ฆฐ ๊ฒƒ์ฒ˜๋Ÿผ ์‹ค์Šต ์บก์ณ๋Š” <body>์™€ </body> ์•ˆ์— ์žˆ๋Š” ํƒœ๊ทธ๋“ค ์ค‘ <script>โ€ฆ</script> ๋ฅผย ์ƒ๋žตํ•˜๊ณ  ์ž‘์„ฑํ•˜๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. Code์™€ ๊ฐ™์ด ์ž‘์„ฑํ•œ๋‹ค์Œ 002.html๋กœ ์ €์žฅ์„ ํ•˜๊ณ  ์‹คํ–‰ํ•˜๋ฉด ์•„๋ž˜์™€ ๊ฐ™์ด ๋‚˜์˜ต๋‹ˆ๋‹ค.
๋นจ๊ฐ„์ƒ‰ ๋„ค๋ชจ๋Š” ์ดํ•ด๋ฅผ ๋•๊ธฐ ์œ„ํ•ด ์ž‘์„ฑํ•œ ๊ฒƒ์ž…๋‹ˆ๋‹ค. 1๊ฐœ์˜ row์— 4 ์ปฌ๋Ÿผ์”ฉ ํ• ๋‹นํ–ˆ์œผ๋ฏ€๋กœ ๊ท ๋“ฑํ•œ ๋„“์ด๋กœ ์ถœ๋ ฅ๋ฉ๋‹ˆ๋‹ค.
ย 
<div class="container"> <div class="row"> <div class="col-md-4"> <h1>hello</h1> </div> <div class="col-md-4"> <h1>hello</h1> </div> <div class="col-md-4"> <h1>hello</h1> </div> </div> </div>
ย 
ย 
002.html002.html
ย 
์ด๋ฒˆ์—๋Š” ํ•œ ๊ฐœ์˜ row๋ฅผ ๋” ์ฃผ์–ด ๋ดค์Šต๋‹ˆ๋‹ค. ๋นจ๊ฐ„์ƒ‰ ๋„ค๋ชจ๋Š” ์ดํ•ด๋ฅผ ๋•๊ธฐ ์œ„ํ•œ ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์œ„์—๋Š” 4์ปฌ๋Ÿผ์”ฉ ์ฃผ์—ˆ๊ธฐ ๋•Œ๋ฌธ์— 3๋“ฑ๋ถ„์ด ๋˜์—ˆ๊ณ  ์•„๋ž˜๋Š” 6์ปฌ๋Ÿผ์”ฉ ์ฃผ์—ˆ๊ธฐ ๋•Œ๋ฌธ์— 2๋“ฑ๋ถ„์ด ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
ย 
<div class="container"> <div class="row"> <div class="col-md-4"> <h1>hello</h1> </div> <div class="col-md-4"> <h1>hello</h1> </div> <div class="col-md-4"> <h1>hello</h1> </div> </div> <div class="row"> <div class="col-md-6"> <h1>hello</h1> </div> <div class="col-md-6"> <h1>hello</h1> </div> </div> </div>
ย 
003.html003.html
ย 
์•„๋ž˜ ๊ณต์‹ ํ™ˆํŽ˜์ด์ง€์—์„œ ๋ณด๋“ฏ์ด ํ•˜๋‚˜์˜ ์ปฌ๋Ÿผ ๋‹จ์œ„๋ฅผ ๋‹ค์‹œ ๋ถ„ํ• ํ•˜๋Š” ๊ฒƒ๋„ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. ์‹ค์Šต์€ ํ•ด๋ณด์ง€ ์•Š๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.
ย 
notion imagenotion image
ย 
๊ทธ๋ฆฌ๋“œ ์‹œ์Šคํ…œ์—์„œ 12์ปฌ๋Ÿผ์„ ๋ชจ๋‘ ์ด์šฉํ•  ๋•Œ ๋„“์ด๋ฅผ 100% ์‚ฌ์šฉํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด .container-fluid๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
์ปฌ๋Ÿผ ์‚ฌ์ด์— ์—ฌ๋ฐฑ์€ .row์— .no-gutters๋ฅผ ์ ์šฉํ•˜๋ฉด padding๊ณผ margin์„ ์ œ๊ฑฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
ย 
notion imagenotion image
ย 
๊ณต์‹ ํ™ˆํŽ˜์ด์ง€์— ๋‚˜์™€์žˆ๋Š” ๊ทธ๋ฆฌ๋“œ ์‹œ์Šคํ…œ ๊ธฐ์ค€์ž…๋‹ˆ๋‹ค. Nestable์€ ์ปฌ๋Ÿผ์„ ๋˜๋‹ค๋ฅธ ์ปฌ๋Ÿผ์œผ๋กœ ๋‚˜๋ˆŒ ์ˆ˜ ์žˆ๋‹ค๋Š” ์–˜๊ธฐ์ž…๋‹ˆ๋‹ค.
์šฐ๋ฆฌ๋Š” ์ฃผ๋กœ md๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

3. ์ด๋ฏธ์ง€

ย 
์ด๋ฏธ์ง€์— ๋ฐ˜์‘ํ˜•๊ณผ ์Šคํƒ€์ผ์„ ์ž…ํžˆ๋Š” ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค. ์•„๋ž˜ ์‹คํ–‰ ์ด๋ฏธ์ง€๋Š” ๊ฐ€๋กœ๊ฐ€ 2000px์ธ ์ด๋ฏธ์ง€์ž…๋‹ˆ๋‹ค. 3๋ฒ„์ „์—์„œ๋Š” img-responsive๋ฅผ ์‚ฌ์šฉํ–ˆ์—ˆ์Šต๋‹ˆ๋‹ค.
ย 
<div class="container"> <div class="row"> <div class="col-2"> <img src="img/temp2000.png" class="img-fluid" alt="img"> </div> <div class="col-2"> hello </div> <div class="col-2"> hello </div> </div> </div>
ย 
004.html004.html
ย 
์ด๋ฏธ์ง€ ์ธ๋„ค์ผ์ž…๋‹ˆ๋‹ค. ์ž‘์€์ด๋ฏธ์ง€ ๋ณด๋‹ค๋Š” ํฐ ์ด๋ฏธ์ง€์— ํ™œ์šฉ๋ฉ๋‹ˆ๋‹ค.
<div class="container"> <div class="row"> <div class="col-2"> <img src="img/temp.png" class="img-thumbnail" alt="img"> </div> <div class="col-2"> hello </div> <div class="col-2"> hello </div> </div> </div>
ย 
005.html005.html
ย 
ย 
ํ™”๋ฉด์—๋Š” ๋ณด์ด์ง€ ์•Š์ง€๋งŒ ์ด๋ฏธ์ง€๊ฐ€ ์ปฌ๋Ÿผ์˜ ๊ฐ€์žฅ ์˜ค๋ฅธ์ชฝ์— ๋ถ™์–ด์žˆ์Šต๋‹ˆ๋‹ค. ๋˜ํ•œ ํ…Œ๋‘๋ฆฌ๊ฐ€ ๋ฏธ๋ฌ˜ํ•˜๊ฒŒ ๊นŽ์—ฌ ์žˆ๋Š” ๊ฒƒ์„ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ถ”๊ฐ€๋กœ ์ด๋ฏธ์ง€๋ฅผ ๋‘ฅ๊ทธ๋ ‡๊ฒŒ ๋งŒ๋“œ๋Š” class๋Š” rounded-circle์ž…๋‹ˆ๋‹ค. 3 ์ด์ „์˜ ๋ฒ„์ „์—์„œ๋Š” img-circle์„ ์‚ฌ์šฉํ–ˆ์—ˆ์Šต๋‹ˆ๋‹ค.
ย 
<div class="container"> <div class="row"> <div class="col-6"> <img src="img/temp.png" class="rounded float-right" alt="img"> </div> <div class="col-2"> hello </div> <div class="col-2"> hello </div> </div> </div>
ย 
006.html006.html
์ด์ œ๋ถ€ํ„ฐ๋Š” Code์™€ Output ์œ„์ฃผ๋กœ ๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.
ย 
<img src="...", class="img_field" alt="Responsive image">
ย 
notion imagenotion image
ย 
ย 
<img src="..." alt="..." class="img-thubnail">
ย 
notion imagenotion image
ย 
<img src="cinqueterre.jpg" class="rounded-circle alt="Cinque Terre">
ย 
notion imagenotion image

4. ํ…Œ์ด๋ธ”

๋‹ค์Œ์œผ๋กœ๋Š” ๋ถ€ํŠธ์ŠคํŠธ๋žฉ์—์„œ ๊ธฐ๋ณธ์ ์œผ๋กœ ์ œ๊ณตํ•˜๊ณ  ์žˆ๋Š” Table์— ๋Œ€ํ•˜์—ฌ ์•Œ์•„๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. Thead์—๋Š” thead-dark๋‚˜ thead-light๋ฅผ ์ฃผ์–ด thead๋ฅผ ๋ถ€๊ฐ์‹œํ‚ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. table-striped๋ฅผ ์ฃผ๋ฉด ํ…Œ์ด๋ธ”์ด ์ค‘๊ฐ„์ค‘๊ฐ„ ๊ฐ•์กฐ๋œ ๊ฒฉ์ž๋ฌด๋Šฌ๋กœ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
ย 
<table class="table"> <thead> <tr> <th scope="col">๊ตฌ๋ถ„</th> <th scope="col">์ฑ…์ด๋ฆ„</th> <th scope="col">ํŒ๋งค๋Ÿ‰</th> </tr> </thead> <tbody> <tr> <th scope="row">1</th> <td>ํ•ด๋ฆฌํฌํ„ฐ</td> <td>100๊ถŒ</td> </tr> <tr> <th scope="row">2</th> <td>ํ•ด๋ฆฌํฌํ„ฐ2</td> <td>200๊ถŒ</td> </tr> </tbody> </table>
ย 
notion imagenotion image
ย 
๊ธฐ๋ณธ ํ…Œ์ด๋ธ”๊ณผ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ table-striped๋ฅผ ์ฃผ๋ฉด ํ…Œ์ด๋ธ”์ด ์ค‘๊ฐ„์ค‘๊ฐ„ ๊ฐ•์กฐ๋œ ๊ฒฉ์ž๋ฌด๋Šฌ๋กœ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
ย 
<table class="table table-dark"> <thead> <tr> <th scope="col">๊ตฌ๋ถ„</th> <th scope="col">์ฑ…์ด๋ฆ„</th> <th scope="col">ํŒ๋งค๋Ÿ‰</th> </tr> </thead> <tbody> <tr> <th scope="row">1</th> <td>ํ•ด๋ฆฌํฌํ„ฐ</td> <td>100๊ถŒ</td> </tr> <tr> <th scope="row">2</th> <td>ํ•ด๋ฆฌํฌํ„ฐ2</td> <td>200๊ถŒ</td> </tr> </tbody> </table>
ย 
notion imagenotion image
ย 
๊ธฐ๋ณธ ํ…Œ์ด๋ธ”๊ณผ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ table-striped๋ฅผ ์ฃผ๋ฉด ํ…Œ์ด๋ธ”์ด ์ค‘๊ฐ„์ค‘๊ฐ„ ๊ฐ•์กฐ๋œ ๊ฒฉ์ž๋ฌด๋Šฌ๋กœ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. table-dark์—๋„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. table-borderless๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ํ…Œ๋‘๋ฆฌ๋ฅผ ์—†์•จ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
ย 
<table class="table table-bordered"> <thead> <tr> <th scope="col">๊ตฌ๋ถ„</th> <th scope="col">์ฑ…์ด๋ฆ„</th> <th scope="col">ํŒ๋งค๋Ÿ‰</th> </tr> </thead> <tbody> <tr> <th scope="row">1</th> <td>ํ•ด๋ฆฌํฌํ„ฐ</td> <td>100๊ถŒ</td> </tr> <tr> <th scope="row">2</th> <td>ํ•ด๋ฆฌํฌํ„ฐ2</td> <td>200๊ถŒ</td> </tr> </tbody> </table>
ย 
notion imagenotion image
ย 
Table์„ ๊พธ๋ฐ€ ์ˆ˜ ์žˆ๋Š” ์ „์ฒด ์ƒ‰์ž…๋‹ˆ๋‹ค. ํ•„์š”์— ๋”ฐ๋ผ ํ™œ์šฉํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.
ย 
<tbody> <tr class="table-active"><td>hello</td></tr> <tr class="table-primary"><td>hello</td></tr> <tr class="table-secondary"><td>hello</td></tr> <tr class="table-success"><td>hello</td></tr> <tr class="table-danger"><td>hello</td></tr> <tr class="table-warning"><td>hello</td></tr> <tr class="table-info"><td>hello</td></tr> <tr class="table-light"><td>hello</td></tr> <tr class="table-dark"><td>hello</td></tr> <tr class="bg-primary"><td>hello</td></tr> <tr class="bg-success"><td>hello</td></tr> <tr class="bg-warning"><td>hello</td></tr> <tr class="bg-danger"><td>hello</td></tr> <tr class="bg-info"><td>hello</td></tr> </tbody> </table>
ย 
notion imagenotion image
ย 

5. ๋ฒ„ํŠผ

ย 
๋ถ€ํŠธ์ŠคํŠธ๋žฉ์— ๋ฒ„ํŠผ์€ ๋‹ค์–‘ํ•œ ํฌ๊ธฐ์™€ ์ƒ‰์„ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค. ์•„๋ž˜๋Š” ๋ถ€ํŠธ์ŠคํŠธ๋žฉ์—์„œ ๊ธฐ๋ณธ์ ์œผ๋กœ ์ œ๊ณตํ•˜๊ณ  ์žˆ๋Š” ๋ฒ„ํŠผ์ž…๋‹ˆ๋‹ค.
ย 
<button type="button" class="btn btn-primary">Primary</button> <button type="button" class="btn btn-secondary">Secondary</button> <button type="button" class="btn btn-success">Success</button> <button type="button" class="btn btn-danger">Danger</button> <button type="button" class="btn btn-warning">Warning</button> <button type="button" class="btn btn-info">Info</button> <button type="button" class="btn btn-light">Light</button> <button type="button" class="btn btn-dark">Dark</button> <button type="button" class="btn btn-link">Link</button>
ย 
notion imagenotion image
ย 
๋ฒ„ํŠผ์€ <button> ์š”์†Œ์™€ ํ•จ๊ป˜ ์‚ฌ์šฉํ•˜๋„๋ก ์„ค๊ณ„๋˜์—ˆ์ง€๋งŒ ๋‹ค๋ฅธ ์š”์†Œ์—๋„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์•„๋ž˜ ๋‹ค์–‘ํ•œ ์˜ˆ์ œ๋ฅผ ์ฐธ๊ณ ํ•˜์—ฌ ํ™ˆํŽ˜์ด์ง€๋ฅผ ์ž‘์„ฑํ•˜์‹œ๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ๋ชจ๋‘ ๋™์ผํ•œ ๋ชจ์–‘์˜ ๋ฒ„ํŠผ์„ ๋งŒ๋“ค์–ด์ค๋‹ˆ๋‹ค.
ย 
<a class="btn btn-primary" href="#" role="button">Link</a> <button class="btn btn-primary" type="submit">Button</button> <input class="btn btn-primary" type="button" value="Input"> <input class="btn btn-primary" type="submit" value="Submit"> <input class="btn btn-primary" type="reset" value="Reset">
ย 
notion imagenotion image
ย 
์•„์›ƒ๋ผ์ธ๋งŒ ๋“ค์–ด๊ฐ„ ๋ฒ„ํŠผ์„ ๋งŒ๋“ค ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ธฐ๋ณธ ํด๋ž˜์Šค๋ฅผ .btn-outline-*๋กœ ๋ฐ”๊พธ๋ฉด ๋ฒ„ํŠผ์˜ ๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง€์™€ ์ƒ‰์ƒ์ด ์ œ๊ฑฐ๋œ ์•„์›ƒ๋ผ์ธ ๋ฒ„ํŠผ์„ ๋งŒ๋“ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
ย 
<button type="button" class="btn btn-outline-primary">Primary</button> <button type="button" class="btn btn-outline-secondary">Secondary</button> <button type="button" class="btn btn-outline-success">Success</button> <button type="button" class="btn btn-outline-danger">Danger</button> <button type="button" class="btn btn-outline-warning">Warning</button> <button type="button" class="btn btn-outline-info">Info</button> <button type="button" class="btn btn-outline-light">Light</button> <button type="button" class="btn btn-outline-dark">Dark</button>
ย 
notion imagenotion image
ย 
๋ถ€ํŠธ์ŠคํŠธ๋žฉ์€ ๋ฒ„ํŠผ์˜ ์‚ฌ์ด์ฆˆ๋ฅผ ๋น ๋ฅด๊ฒŒ ๋ณ€๊ฒฝํ•˜๊ธฐ ์œ„ํ•œ ํด๋ž˜์Šค๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. .btn-lg (ํฐ ๋ฒ„ํŠผ)๋˜๋Š” .btn-sm(์ž‘์€ ๋ฒ„ํŠผ)์„ ์ถ”๊ฐ€ํ•˜๋ฉด ์•„๋ž˜์ฒ˜๋Ÿผ ๋ฒ„ํŠผ์˜ ํฌ๊ธฐ๊ฐ€ ์กฐ์ •๋ฉ๋‹ˆ๋‹ค.
ย 
<button type="button" class="btn btn-primary btn-lg">ํฐ ๋ฒ„ํŠผ</button> <button type="button" class="btn btn-secondary btn-lg">ํฐ ๋ฒ„ํŠผ</button> <button type="button" class="btn btn-primary btn-sm">์ž‘์€ ๋ฒ„ํŠผ</button> <button type="button" class="btn btn-secondary btn-sm">์ž‘์€ ๋ฒ„ํŠผ</button>
ย 
notion imagenotion image
ย 
.btn-block์„ ์ถ”๊ฐ€ํ•˜๋ฉด ๋ถ€๋ชจ์˜ ์ „์ฒด ๋„“์ด๋งŒํ•œ ๋ฒ„ํŠผ์„ ๋งŒ๋“ค ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.
ย 
<button type="button" class="btn btn-primary btn-lg btn-block">๋ธ”๋ก ๋ ˆ๋ฒจ ๋ฒ„ํŠผ</button> <button type="button" class="btn btn-secondary btn-lg btn-block">๋ธ”๋ก ๋ ˆ๋ฒจ ๋ฒ„ํŠผ</button>
ย 
notion imagenotion image
ย 
๋ถ€ํŠธ์ŠคํŠธ๋žฉ ๋ฒ„ํŠผ์—๋Š” ํ™œ์„ฑ๊ณผ ๋น„ํ™œ์„ฑ์„ ์ œ๊ณตํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๋ฒ„ํŠผ์ด Acrive(ํ™œ์„ฑ)์ƒํƒœ๊ฐ€ ๋˜๋ฉด ๋ฒ„ํŠผ์ด ๋ˆŒ๋Ÿฌ์ ธ ๋ณด์ž…๋‹ˆ๋‹ค.
ย 
<a href="#" class="btn btn-primary btn-lg active" role="button" aria-pressed="true">Primary link</a> <a href="#" class="btn btn-secondary btn-lg active" role="button" aria-pressed="true">Link</a>
ย 
notion imagenotion image
ย 
๋ฒ„ํŠผ์˜ ๋น„ํ™œ์„ฑ ์ƒํƒœ๋Š” ๊ธฐ์กด์˜ ์ƒ‰ ๊ทธ๋Œ€๋กœ๋ฅผ ๋‚˜ํƒ€๋ƒ…๋‹ˆ๋‹ค. disabled ์†์„ฑ์„ <button> ์š”์†Œ์— ์ถ”๊ฐ€ํ•˜์—ฌ ๋ฒ„ํŠผ์„ ๋น„ํ™œ์„ฑ ์ƒํƒœ๋กœ ๋งŒ๋“ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํ™œ์„ฑํ™”๋œ ์ƒํƒœ๋Š” .active์ž…๋‹ˆ๋‹ค.
ย 
<button type="button" class="btn btn-lg btn-primary" disabled>Primary button</button> <button type="button" class="btn btn-secondary btn-lg" disabled>Button</button>
ย 
notion imagenotion image
ย 
<a>ย ์š”์†Œ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋น„ํ™œ์„ฑ ๋ฒ„ํŠผ์€ ์กฐ๊ธˆ ๋‹ค๋ฅด๊ฒŒ ๋™์ž‘ํ•ฉ๋‹ˆ๋‹ค.
  1. <a>๋Š”ย disabledย ์†์„ฑ์„ ์ง€์›ํ•˜์ง€ ์•Š์œผ๋ฏ€๋กœ ๋น„ํ™œ์„ฑํ™” ๋œ ๊ฒƒ์œผ๋กœ ๋ณด์ด๊ฒŒ ํ•˜๋ ค๋ฉดย .disabled ํด๋ž˜์Šค๋ฅผ ์ถ”๊ฐ€ ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
  1. anchor ๋ฒ„ํŠผ์˜ ๋ชจ๋“ ย pointer-events๋ฅผ ๋น„ํ™œ์„ฑํ™” ํ•ฉ๋‹ˆ๋‹ค. ํ•ด๋‹น ์†์„ฑ์„ ์ง€์›ํ•˜๋Š” ๋ธŒ๋ผ์šฐ์ €์—์„œ๋Š” ๋น„ํ™œ์„ฑํ™” ๋œ ์ปค์„œ๊ฐ€ ์ „ํ˜€ ํ‘œ์‹œ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
  1. Disabled buttons(๋น„ํ™œ์„ฑ์ƒํƒœ ๋ฒ„ํŠผ)์€ย aria-disabled="true"ย ์†์„ฑ์„ ํฌํ•จํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
  1. ๋น„ํ™œ์„ฑํ™” ๋œ ๋ฒ„ํŠผ์—๋Š” ์š”์†Œ์˜ ์ƒํƒœ๋ฅผ ํ‘œ์‹œํ•˜๊ธฐ ์œ„ํ•ดย aria-disabled=โ€œtrueโ€ย ์†์„ฑ์„ ํฌํ•จํ•ฉ๋‹ˆ๋‹ค.
ย 
<a href="#" class="btn btn-primary btn-lg disabled" role="button" aria-disabled="true">Primary link</a> <a href="#" class="btn btn-secondary btn-lg disabled" role="button" aria-disabled="true">Link</a>
ย 
notion imagenotion image
ย 
๋ฒ„ํŠผย ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์‚ฌ์šฉํ•˜๋ฉด ๋ฒ„ํŠผ์œผ๋กœ ๋” ๋งŽ์€ ์ž‘์—…์„ ํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. ํ† ๊ธ€ ์ƒํƒœ๋ฅผ ์•Œ๊ธฐ ์œ„ํ•ด์„œ๋Š” data-toggle="button"์„ ์ถ”๊ฐ€ํ•˜์—ฌ ๋ฒ„ํŠผ active ์ƒํƒœ๋ฅผ ํ† ๊ธ€ํ•ฉ๋‹ˆ๋‹ค.
๋ฒ„ํŠผ์„ ๋ฏธ๋ฆฌ ํ† ๊ธ€ํ•  ๊ฒฝ์šฐ์—๋Š” .active ํด๋ž˜์Šค์™€ aria-pressed=โ€œtrueโ€๋ฅผ ์ˆ˜๋™์œผ๋กœ <button>์— ์ถ”๊ฐ€ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
ย 
<button type="button" class="btn btn-primary" data-toggle="button" aria-pressed="false" autocomplete="off"> Single toggle </button>
ย 
notion imagenotion image
ย 
์ฒดํฌ๋ฐ•์Šค์™€ ๋ผ๋””์˜ค ๋ฒ„ํŠผ์— ๋ถ€ํŠธ์ŠคํŠธ๋žฉ์—์„œ ์ œ๊ณตํ•˜๊ณ  ์žˆ๋Š” ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์‚ฌ์šฉํ•ด๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. ๋ถ€ํŠธ์ŠคํŠธ๋žฉ์˜ .button ์Šคํƒ€์ผ์€ <label>๊ณผ ๊ฐ™์€ ์š”์†Œ์— ์ ์šฉ๋˜์–ด checkbo๋‚˜ radio์— ๋ฒ„ํŠผํ† ๊ธ€์„ ์ง€์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ฐ๊ฐ์˜ ์Šคํƒ€์ผ์—์„œ ํ† ๊ธ€๋งํ•  ์ˆ˜ ์žˆ๋„๋ก ๋ณ€๊ฒฝ๋œ ๋ฒ„ํŠผ์ด ํฌํ•จ๋œ.btn-group์— data-toggle="buttons"๋ฅผ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
๋ฒ„ํŠผ๋“ค์˜ ์ฒดํฌ์ƒํƒœ๋Š” ๋ฒ„ํŠผ์˜ ํด๋ฆญ ์ด๋ฒคํŠธ๋ฅผ ํ†ตํ•ด์„œ๋งŒ ์—…๋ฐ์ดํŠธ๋ฉ๋‹ˆ๋‹ค. ๋‹ค๋ฅธ ๋ฐฉ๋ฒ•์„ ์‚ฌ์šฉํ•˜์—ฌ<input type="reset">ย ๋˜๋Š” input์˜ checkedย ์†์„ฑ์„ ์ ์šฉํ•˜์—ฌ ์ž…๋ ฅ์„ ์—…๋ฐ์ดํŠธํ•˜๋Š” ๊ฒฝ์šฐ <label>์„ ์ˆ˜๋™์œผ๋กœ ํ† ๊ธ€ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
๊ธฐ๋ณธ ์„ ํƒ๋œ ๋ฒ„ํŠผ์€ ์ ์šฉํ•˜๋ ค๋ฉด .active ํด๋ž˜์Šค๋ฅผ input์˜ <label>์— ์ˆ˜๋™์œผ๋กœ ์ถ”๊ฐ€ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
ย 
<div class="btn-group" data-toggle="buttons"> <label class="btn btn-secondary active"> <input type="checkbox" checked autocomplete="off"> ์ฒดํฌ๋ฐ•์Šค 1 (๊ธฐ๋ณธ์„ ํƒ) </label> <label class="btn btn-secondary"> <input type="checkbox" autocomplete="off"> ์ฒดํฌ๋ฐ•์Šค 2 </label> <label class="btn btn-secondary"> <input type="checkbox" autocomplete="off"> ์ฒดํฌ๋ฐ•์Šค 3 </label> </div>
ย 
notion imagenotion image
ย 
<div class="btn-group" data-toggle="buttons"> <label class="btn btn-secondary active"> <input type="radio" name="options" id="option1" autocomplete="off" checked> ๋ผ๋””์˜ค 1 (๊ธฐ๋ณธ์„ ํƒ) </label> <label class="btn btn-secondary"> <input type="radio" name="options" id="option2" autocomplete="off"> ๋ผ๋””์˜ค 2 </label> <label class="btn btn-secondary"> <input type="radio" name="options" id="option3" autocomplete="off"> ๋ผ๋””์˜ค 3 </label> </div>
ย 
notion imagenotion image
ย 
Methods(๋ฉ”์†Œ๋“œ):
$().button('toggle')
ํ‘ธ์‹œ ์ƒํƒœ๋ฅผ ํ† ๊ธ€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋ฒ„ํŠผ์— ํ™œ์„ฑํ™”๋œ ์ƒํƒœ๋ฅผ ์ง€์ •ํ•ด๋ณด์„ธ์š”.

6. CARD

ย 
๋ถ€ํŠธ์ŠคํŠธ๋žฉ์˜ Card(์นด๋“œ)๋Š” ๋‹ค์–‘ํ•œ ์ปจํ…์ธ ๋ฅผ ํฌํ•จํ•  ์ˆ˜ ์žˆ๋Š” ํ™•์žฅ์„ฑ์„ ์ง€๋‹ˆ๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๋ถ€ํŠธ์ŠคํŠธ๋žฉ ๋ฒ„์ „ 3์— ์ต์ˆ™ํ•˜์‹œ๋‹ค๋ฉด panel(ํŒจ๋„)์ด๋‚˜ well(์›ฐ), thumbnail(ํ…€๋ธŒ๋„ค์ผ)๋กœ ๋Œ€์ฒด๊ฐ€ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. Card(์นด๋“œ)๋Š” Flexbox(ํ”Œ๋ ‰์Šค๋ฐ•์Šค)๋กœ ์ œ์ž‘๋˜์–ด ์‰ฝ๊ฒŒ ์ •๋ ฌํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ ๋‹ค๋ฅธ ๋ถ€ํŠธ์ŠคํŠธ๋žฉ ์ปดํฌ๋„ŒํŠธ์™€ ์ž˜ ์„ž์ผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
ย 
<div class="card" style="width: 20rem;"> <img class="card-img-top" src="...." alt="Card image cap"> <div class="card-body"> <h4 class="card-title">Card title</h4> <p class="card-text"> Some quick example text to build on the card title and make up the bulk of the card's content. </p> <a href="#" class="btn btn-primary">Go somewhere</a> </div> </div>
ย 
notion imagenotion image
ย 
์นด๋“œ์˜ body๋ฅผ ์ž‘์„ฑํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” .card-body ํด๋ž˜์Šค๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค. ์•„๋ž˜ ๋ณด์ด๋Š” ๊ฒƒ์ด ๊ธฐ๋ณธ ๊ณจ๊ฒฉ์ž…๋‹ˆ๋‹ค.
ย 
<div class="card"> <div class="card-body"> This is some text within a card body. </div> </div>
ย 
notion imagenotion image
ย 
๋‹ค์Œ์€ ๊ณต์‹ ํ™ˆํŽ˜์ด์ง€์—์„œ ์ œ๊ณตํ•˜๊ณ  ์žˆ๋Š” Card์— ํƒ€์ดํ‹€, ํ…์ŠคํŠธ ๋งํฌ ์ž‘์„ฑ ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค.
Titles, text, and links(ํƒ€์ดํ‹€, ํ…์ŠคํŠธ, ๋งํฌ):
  • ํƒ€์ดํ‹€์€ย <h*> ํƒœ๊ทธ์—ย .card-title์„ ์ถ”๊ฐ€
  • ์„œ๋ธŒํƒ€์ดํ‹€์€ <h*> ํƒœ๊ทธ์— .card-subtitle์„ ์ถ”๊ฐ€
  • *.card-body item์— .card-title๊ณผ .card-subtitle์„ ๋ฐฐ์น˜ํ•˜๋ฉด ์•Œ๋งž๊ฒŒ ์ •๋ ฌ
  • ๋งํฌ๋Š” <a> ํƒœ๊ทธ์—ย .card-link๋ฅผ ์ถ”๊ฐ€ํ•˜๋ฉด ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Œ
ย 
<div class="card" style="width: 20rem;"> <div class="card-body"> <h4 class="card-title">Card title</h4> <h6 class="card-subtitle mb-2 text-muted">Card subtitle</h6> <p class="card-text"> Some quick example text to build on the card title and make up the bulk of the card's content </p> <a href="#" class="card-link">Card link</a> <a href="#" class="card-link">Another link</a> </div> </div>
ย 
notion imagenotion image
ย 
Card์•ˆ์—์„œ ์ด๋ฏธ์ง€๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค.
  • .card-img-top์€ ์ด๋ฏธ์ง€๋ฅผ ์นด๋“œ์˜ ์œ— ๋ถ€๋ถ„์— ๋†“์•„์ค๋‹ˆ๋‹ค.
  • .card-text๋ฅผ ์ด์šฉํ•˜์—ฌ ํ…์ŠคํŠธ๋Š” ์นด๋“œ์— ์ถ”๊ฐ€๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • .card-text์•ˆ์˜ ํ…์ŠคํŠธ๋Š” HTML ํƒœ๊ทธ๋กœ ๊พธ๋ฐ€ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
ย 
<div class="card" style="width: 20rem;"> <div class="card-img-top" src="..." alt="Card image cap"> <div class="card-body"> <p class="card-text"> Some quick example text to build on the card title and make up the bulk of the card's content </p> </div> </div>
ย 
notion imagenotion image
ย 
Card์•ˆ์—๋„ ๋ฆฌ์ŠคํŠธ ๊ทธ๋ฃน์„ ๋งŒ๋“ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. Flush list group(ํ”Œ๋Ÿฌ์‹œ ๋ฆฌ์ŠคํŠธ ๊ทธ๋ฃน)์„ ์ด์šฉํ•ด์„œ ์•„๋ž˜์™€ ๊ฐ™์ด ์นด๋“œ ์•ˆ์— ์ปจํ…์ธ  ๋ฆฌ์ŠคํŠธ๋ฅผ ๋งŒ๋“ค์–ด ๋ณด์„ธ์š”.
ย 
<div class="card" style="width: 20rem;"> <ul class="list-group list-group-flush"> <li class="list-group-item">Cras justo odio</li> <li class="list-group-item">Dapibus ac facilisis in</li> <li class="list-group-item">Vestibulum at eros</li> </ul> </div>
ย 
<div class="card" style="width: 18rem;"> <div class="card-header"> Featured </div> <ul class="list-group list-group-flush"> <li class="list-group-item">Cras justo odio</li> <li class="list-group-item">Dapibus ac facilisis in</li> <li class="list-group-item">Vestibulum at eros</li> </ul> </div>
ย 
notion imagenotion image
ย 
์นด๋“œ๋ฅผ ๋ณด๋‹ค ๋” ๋‹ค์ฒด๋กญ๊ฒŒ ๊พธ๋ฏธ๊ธฐ ์œ„ํ•ด ์—ฌ๋Ÿฌ ์ปจํ…์ธ ๋ฅผ ๋ฏน์Šคํ•ด๋ณด์„ธ์š”. ์•„๋ž˜ ์˜ˆ์ œ๋Š” ํ•œ๋ฒˆ ํƒ€์ดํ•‘์„ ํ•ด๋ณด์‹œ๊ธธ ์ถ”์ฒœํ•ด ๋“œ๋ฆฝ๋‹ˆ๋‹ค.
ย 
<div class="card" style="width: 18rem;"> <img class="card-img-top" src=".../100px180/?text=Image cap" alt="Card image cap"> <div class="card-body"> <h5 class="card-title">Card title</h5> <p class="card-text"> Some quick example text to build on the card title and make up the bulk of the card's content. </p> </div> <ul class="list-group list-group-flush"> <li class="list-group-item">Cras justo odio</li> <li class="list-group-item">Dapibus ac facilisis in</li> <li class="list-group-item">Vestibulum at eros</li> </ul> <div class="card-body"> <a href="#" class="card-link">Card link</a> <a href="#" class="card-link">Another link</a> </div> </div>
ย 
notion imagenotion image
ย 
์นด๋“œ ์•ˆ์— ํ•ด๋”์™€ ํ‘ธํ„ฐ๋ฅผ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
ย 
<div class="card"> <div class="card-header"> Featured </div> <div class="card-body"> <h5 class="card-title"> Special title treatment </h5> <p class="card-text"> With supporting text below as a natural lead-in to additional content. </p> <a href="#" class="btn btn-primary"> Go somewhere </a> </div> </div>
ย 
notion imagenotion image
ย 
Card header(์นด๋“œ ํ—ค๋”)๋Š” <h*> ์š”์†Œ์— .card-header๋ฅผ ์ถ”๊ฐ€ํ•˜์—ฌ ์Šคํƒ€์ผ๋ง ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
ย 
<div class="card"> <h5 class="card-header"> Featured </h5> <div class="card-body"> <h5 class="card-title"> Special title treatment </h5> <p class="card-text"> With supporting text below as a natural lead-in to additional content. </p> <a href="#" class="btn btn-primary"> Go somewhere </a> </div> </div>
ย 
notion imagenotion image
ย 
Header and footer(ํ—ค๋”์™€ ํ’‹ํ„ฐ)
<div class="card"> <div class="card-header" Quote </div> <div class="card-body"> <blockquote class="blockquote mb-0"> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante. </p> <footer class="blockquote-footer"> Someone famous in <cite title="Source Title"> Source Title</cite> </footer> </blockquote> </div> </div>
<div class="card text-center"> <div class="card-header"> Featured </div> <div class="card-body"> <h5 class="card-title"> Special title treatment </h5> <p class="card-text"> With supporting text below as a natural lead-in to additional content. </p> <a href="#" class="btn btn-primary"> Go somewhere </a> </div> <div class="card-footer text-muted"> 2 days ago </div> </div>
ย 
notion imagenotion image
ย 
ย 
Sizing(ํฌ๊ธฐ ์กฐ์ •)
2. Using utilities(์œ ํ‹ธ๋ฆฌํ‹ฐ ์‚ฌ์šฉํ•˜๊ธฐ):
๋น ๋ฅด๊ฒŒ ์นด๋“œ์˜ ๋„ˆ๋น„๋ฅผ ๋งž์ถœ ์ˆ˜ ์žˆ๋Š” sizing utilities๋ฅผ ์‚ฌ์šฉํ•ด ๋ณด์„ธ์š”.
<div class="card w-75"> <div class="card-body"> <h4 class="card-title"> Card title </h4> <p class="card-text"> With supporting text below as a natural lead-in to additional content. </p> <a href="#" class="btn btn-primary"> Button </a> </div> </div>
<div class="card w-50"> <div class="card-body"> <h4 class="card-title"> Card title </h4> <p class="card-text"> with supporting text below as a natural lead-in to additional content. </p> <a href="#" class="btn btn-primary"> Button </a> </div> </div>
ย 
notion imagenotion image
ย 
3. Using custon CSS(์‚ฌ์šฉ์ž ์ •์˜ CSS ์‚ฌ์šฉํ•˜๊ธฐ):
๋„ˆ๋น„๋ฅผ ๋งž์ถ”๊ธฐ ์œ„ํ•ด stylesheets(์Šคํƒ€์ผ์‹œํŠธ)๋‚˜ inline style(์ธ๋ผ์ธ ์Šคํƒ€์ผ)์„ ํ†ตํ•ด ์‚ฌ์šฉ์ž ์ •์˜ย CSS๋ฅผ ์‚ฌ์šฉํ•ด ๋ณด์„ธ์š”.
ย 
<div class="card" style="width: 20rem;"> <div class="card-body"> <h4 class="card-title"> Special title treatment </h4> <p class="card-text"> With supporting text below as a natural lead-in to additional content. </p> <a href="#" class="btn btn-primary"> Go somewhere </a> </div> </div>
ย 
notion imagenotion image
ย 
Text alignment(ํ…์ŠคํŠธ ์ •๋ ฌ):
Text align classes๋ฅผ ํ†ตํ•ด ์ „์ฒด ํ˜น์€ ์ผ๋ถ€๋ถ„์—์„œ ํ…์ŠคํŠธ ์ •๋ ฌ์„ ๋น ๋ฅด๊ฒŒ ๋ฐ”๊ฟ€ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
ย 
<div class="card" style="width: 20rem;"> <div class="card-body"> <h4 class="card-title"> Special title treatment </h4> <p class="card-text"> With supporting text below as a natural lead-in to additional content. </p> <a href="#" class="btn btn-primary"> Go somewhere </a> </div> </div>
<div class="card text-center" style="width: 20rem;"> <div class="card-body"> <h4 class="card-title"> Special title treatment </h4> <p class="card-text"> With supporting text below as a natural lead-in to additional content. </p> <a href="#" class="btn btn-primary"> Go somewhere </a> </div> </div>
<div class="card text-right" style="width: 20rem;"> <div class="card-body"> <h4 class="card-title"> Special title treatment </h4> <p class="card-text"> With supporting text below as a natural lead-in to additional content. </p> <a href="#" class="btn btn-primary"> Go somewhere </a> </div> </div>
ย 
notion imagenotion image
ย 
๋ถ€ํŠธ์ŠคํŠธ๋žฉ์€ ์นด๋“œ ๋‚ด ๋„ค๋น„๊ฒŒ์ด์…˜์„ ํ—ˆ์šฉํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. nav components๋ฅผ ์ด์šฉํ•ด์„œ ์นด๋“œ์˜ header(ํ—ค๋”)๋‚˜ block(๋ธ”๋ก)์— ๋„ค๋น„๊ฒŒ์ด์…˜์„ ์ถ”๊ฐ€ํ•ด๋ณด์„ธ์š”. (์˜ˆ์ œ ๊ณ„์†)
ย 
<div class="card text-center"> <div class="card-header"> <ul class="nav nav-tabs card-header-tabs"> <li class="nav-item"> <a class="nav-link active" href="#"> Active </a> </li> <li class="nav-item"> <a class="nav-link" href="#">Link </a> </li> <li class="nav-item"> <a class="nav-link disabled" href="#"> Disabled </a> </li> </ul> </div> <div class="card-body"> <h5 class="card-title"> Special title treatment </h5> <p class="card-text"> With supporting text below as a natural lead-into additional content. </p> <a href="#" class="btn btn-primary">Go somewhere </a> </div> </div>
ย 
notion imagenotion image
ย 
<div class="card text-center"> <div class="card-header"> <ul class="nav nav-pills card-header-pills"> <li class="nav-item"> <a class="nav-link active" href="#"> Active </a> </li> <li class="nav-item"> <a class="nav-link" href="#">Link </a> </li> <li class="nav-item"> 34 <a class="nav-link disabled" href="#">Disabled </a> </li> </ul> </div> <div class="card-body"> <h5 class="card-title"> Special title treatment </h5> <p class="card-text"> With supporting text below as a natural lead-into additional content. </p> <a href="#" class="btn btn-primary"> Go somewhere </a> </div> </div>
ย 
notion imagenotion image
ย 
๋ถ€ํŠธ์ŠคํŠธ๋žฉ์—๋Š” ์นด๋“œ์— ์ด๋ฏธ์ง€ ์ž‘์—…์„ ์œ„ํ•œ ๋ช‡๊ฐ€์ง€ ์˜ต์…˜์ด ์žˆ์Šต๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด ์นด๋“œ์˜ ์–‘์ชฝ ๋์— image caps๋ฅผ ์ถ”๊ฐ€ํ•˜๊ฑฐ๋‚˜ ์นด๋“œ ๋‚ด์šฉ์œผ๋กœ ์ด๋ฏธ์ง€๋ฅผ ๊ฒน์น˜๊ฑฐ๋‚˜ ์ด๋ฏธ์ง€๋ฅผ ์นด๋“œ์— ๊ฐ„๋‹จํ•˜๊ฒŒ ๋ผ์›Œ ๋„ฃ๊ธฐ๋ฅผ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
Header(ํ—ค๋”), footer(ํ’‹ํ„ฐ)์™€ย ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ card(์นด๋“œ)๋Š”ย ์ƒ๋‹จ ๋ฐ ํ•˜๋‹จ์—ย "image caps"์ด ํฌํ•จ๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
ย 
<div class="card mb-3"> <img class="card-img-top" src="..." alt="Card image cap">22 <div class="card-body"> <h4 class="card-title"> Card title </h4> <p class="card-text"> This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. </p> <p class="card-text"> <small class="text-muted"> Last updated 3 mins ago</small> </p> </div> </div> <div class="card"> <div class="card-body"> <h4 class="card-title"> Card title </h4> <p class="card-text"> This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. </p> <p class="card-text"> <small class="text-muted"> Last updated 3 mins ago </small> </p> </div> <img class="card-img-bottom" src="..." alt="Card image cap"> </div>
ย 
notion imagenotion image
ย 
๋ถ€ํŠธ์ŠคํŠธ๋žฉ์—์„œ๋Š” ์ด๋ฏธ์ง€๋ฅผ ์นด๋“œ ๋ฐฐ๊ฒฝ์œผ๋กœ ๋ฐ”๊พธ๊ณ  ์นด๋“œ์˜ ํ…์ŠคํŠธ๋ฅผ ์˜ค๋ฒ„๋ ˆ์ดํ•  ์ˆ˜ ์žˆ๋Š” ๋ฐฉ๋ฒ•์„ ์ œ๊ณตํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.
ย 
<div class="card bg-dark text-white"> <img class="card-img" src=".../100px270/#55595c:#373a3c/text:Card image" alt="Card image"> <div class="card-img-overlay"> <h5 class="card-title"> Card title </h5> <p class="card-text"> This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. </p> <p class="card-text"> Last updated 3 mins ago </p> </div> </div>
ย 
notion imagenotion image
ย 
์นด๋“œ๋Š” ๋ฐฐ๊ฒฝ, ํ…Œ๋‘๋ฆฌ, ์ƒ‰๊น”์„ ๋ฐ”๊ฟ€ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์•„๋ž˜ ๋‚ด์šฉ์„ ์ฐธ๊ณ ํ•˜์„ธ์š”.
ย 
<div class="card text-white bg-primary mb-3" style="max-width: 18rem;"> <div class="card-header">Header</div> <div class="card-body"> <h5 class="card-title">Primary card title</h5> <p class="card-text"> Some quick example text to build on the card title and make up the bulk of the card's content.</p> </div> </div> <div class="card text-white bg-secondary mb-3" style="max-width: 18rem;"> <div class="card-header">Header </div> <div class="card-body"> <h5 class="card-title">Secondary card title</h5> <p class="card-text"> Some quick example text to build on the card title and make up the bulk of the card's content. </p> </div> </div> <div class="card text-white bg-success mb-3" style="max-width: 18rem;"> <div class="card-header">Header</div> <div class="card-body"> <h5 class="card-title">Success card title</h5> <p class="card-text"> Some quick example text to build on the card title and make up the bulk of the card's content. </p> </div> </div> <div class="card text-white bg-danger mb-3" style="max-width: 18rem;"> <div class="card-header">Header</div> <div class="card-body"> <h5 class="card-title">Danger card title</h5> <p class="card-text"> Some quick example text to build on the card title and make up the bulk of the card's content. </p> </div> </div>
ย 
notion imagenotion image
ย 
ย 
<div class="card text-white bg-warning mb-3" style="max-width: 18rem;"> <div class="card-header">Header</div> <div class="card-body"> <h5 class="card-title">Warning card title</h5> <p class="card-text"> Some quick example text to build on the card title and make up the bulk of the card's content. </p> </div> </div> <div class="card text-white bg-info mb-3" style="max-width: 18rem;"> <div class="card-header">Header</div> <div class="card-body"> <h5 class="card-title">Info card title</h5> <p class="card-text"> Some quick example text to build on the card title and make up the bulk of the card's content. </p> </div> </div> <div class="card bg-light mb-3" style="max-width: 18rem;"> <div class="card-header">Header</div> <div class="card-body"> <h5 class="card-title">Light card title</h5> <p class="card-text"> Some quick example text to build on the card title and make up the bulk of the card's content. </p> </div> </div> <div class="card text-white bg-dark mb-3" style="max-width: 18rem;"> <div class="card-header">Header</div> <div class="card-body"> <h5 class="card-title">Dark card title</h5> <p class="card-text"> Some quick example text to build on the card title and make up the bulk of the card's content. </p> </div> </div>
ย 
notion imagenotion image
ย 
์นด๋“œ์—๋„ ํ…Œ๋‘๋ฆฌ๋ฅผ ์ค„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. border-color๋ฅผ ๋ฐ”๊พธ๊ธฐ ์œ„ํ•ด์„œ๋Š” border utilities๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค. ๋ถ€๋ชจ์š”์†Œ์˜ ์นด๋“œ๋‚˜ ์นด๋“œ ์ปจํ…์ธ ์— .text-{color} ํด๋ž˜์Šค๋ฅผ ์ถ”๊ฐ€ํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.
ย 
<div class="card border-primary mb-3" style="max-width: 18rem;"> <div class="card-header">Header</div> <div class="card-body text-primary"> <h5 class="card-title">Primary card title</h5> <p class="card-text"> Some quick example text to build on the card title and make up the bulk of the card's content. </p> </div> </div> <div class="card border-secondary mb-3" style="max-width: 18rem;"> <div class="card-header">Header</div> <div class="card-body text-secondary"> <h5 class="card-title">Secondary card title</h5> <p class="card-text"> Some quick example text to build on the card title and make up the bulk of the card's content. </p> </div> </div> <div class="card border-success mb-3" style="max-width: 18rem;"> <div class="card-header">Header</div> <div class="card-body text-success"> <h5 class="card-title">Success card title</h5> <p class="card-text"> Some quick example text to build on the card title and make up the bulk of the card's content. </p> </div> </div> <div class="card border-danger mb-3" style="max-width: 18rem;"> <div class="card-header">Header</div> <div class="card-body text-danger"> <h5 class="card-title">Danger card title</h5> <p class="card-text"> Some quick example text to build on the card title and make up the bulk of the card's content. </p> </div> </div>
ย 
notion imagenotion image
ย 
์นด๋“œ ํ—ค๋”์™€ ํ’‹ํ„ฐ ํ…Œ๋‘๋ฆฌ๋ฅผ ๋ฐ”๊พธ๊ฑฐ๋‚˜ ์ง€์šฐ๋ฉด ์ข€ ๋” ์„ธ๋ จ๋œ ์นด๋“œ๋ฅผ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. .bg-transparent๋ฅผ ์ด์šฉํ•ด์„œ background-color๋ฅผ ์ œ๊ฑฐํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.
ย 
<div class="card border-success mb-3" style="max-width: 20rem;"> <div class="card-header bg-transparent border-success">Header</div> <div class="card-body text-success"> <h4 class="card-title">Success card title</h4> <p class="card-text"> Some quick example text to build on the card title and make up the bulk of the card's content. </p> </div> <div class="card-footer bg-transparent border-success">Footer</div> </div>
ย 
notion imagenotion image
ย 
์นด๋“œ ์•ˆ์— ์ปจํ…์ธ ๋ฅผ ์ถ”๊ฐ€ํ•˜๊ธฐ ์œ„ํ•ด์„œย ๋ถ€ํŠธ์ŠคํŠธ๋žฉ์€ ์นด๋“œ์˜ ๋ ˆ์ด์•„์›ƒ์ž‘์—…์˜ ์˜ต์…˜๋“ค์„ ํฌํ•จํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.
๊ทธ๋ฃน์˜ ์นด๋“œ๋“ค์„ ๊ฐ™์€ ๋„ˆ๋น„์™€ ๋†’์ด์˜ ๋ถ™์–ด์žˆ๋Š” columns(์—ด)๋กœย ๋ฐ”๊ฟ”์ค„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
์นด๋“œ ๊ทธ๋ฃน์€ ๋™์ผํ•œ ์‚ฌ์ด์ฆˆ๋กœ ๋งŒ๋“ค๊ธฐ ์œ„ํ•ด display: flex;๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํ’‹ํ„ฐ๋ฅผ ์‚ฌ์šฉํ•ด์„œ ์นด๋“œ ๊ทธ๋ฃน์„ ์‚ฌ์šฉํ•  ๊ฒฝ์šฐ, ์ปจํ…์ธ ๋Š” ์ž๋™์ ์œผ๋กœ ์ •๋ ฌ๋ฉ๋‹ˆ๋‹ค. ์ฝ”๋“œ๋Š” ๋‹ค์Œ์žฅ์— ๋„ฃ์–ด๋‘์—ˆ์Šต๋‹ˆ๋‹ค.
ย 
Card groups(์นด๋“œ ๊ทธ๋ฃน) (์˜ˆ์‹œ ๊ณ„์†)
<div class="card-group"> <div class="card"> <img class="card-img-top" src="..." alt="Card image cap"> <div class="card-body"> <h4 class="card-title">Card title</h4> <p class="card-text"> This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. </p> <p class="card-text"> <small class="text-muted"> Last updated 3 mins ago </small> </p> </div> </div> <div class="card"> <img class="card-img-top" src="..." alt="Card image cap"> <div class="card-body"> <h4 class="card-title">Card title</h4> <p class="card-text"> This card has supporting text below as a natural lead-in to additional content. </p> <p class="card-text"> <small class="text-muted"> Last updated 3 mins ago</small> </p> </div> </div> <div class="card"> <img class="card-img-top" src="..." alt="Card image cap"> <div class="card-body"> <h4 class="card-title">Card title</h4> <p class="card-text"> This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action. </p> <p class="card-text"> <small class="text-muted"> Last updated 3 mins ago </small> </p> </div> </div> </div>
ย 
notion imagenotion image
ย 
<div class="card-group"> <div class="card"> <img class="card-img-top" src="..." alt="Card image cap"> <div class="card-body"> <h4 class="card-title">Card title</h4> <p class="card-text"> This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. </p> </div> <div class="card-footer"> <small class="text-muted">Last updated 3 mins ago</small> </div> </div> <div class="card"> <img class="card-img-top" src="..." alt="Card image cap"> <div class="card-body"> <h4 class="card-title">Card title</h4> <p class="card-text"> This card has supporting text below as a natural lead-in to additional content. </p> </div> <div class="card-footer"> <small class="text-muted">Last updated 3 mins ago</small> </div> </div> <div class="card"> <img class="card-img-top" src="..." alt="Card image cap"> <div class="card-body"> <h4 class="card-title">Card title</h4> <p class="card-text"> This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action. </p> </div> <div class="card-footer"> <small class="text-muted">Last updated 3 mins ago</small> </div> </div> </div>
ย 
notion imagenotion image
ย 
๋„ˆ๋น„์™€ ๋†’์ด๊ฐ€ ๋™์ผํ•˜์ง€๋งŒ ๋ถ™์–ด์žˆ์ง€ ์•Š์€ ๊ฒƒ์„ ์นด๋“œ ๋ฐํฌ๋ผ๊ณ  ๋งํ•ฉ๋‹ˆ๋‹ค. ํ‘ธํ„ฐ๋ฅผ ์‚ฌ์šฉํ•ด์„œ ์นด๋“œ ๊ทธ๋ฃน์„ ์‚ฌ์šฉํ•  ๊ฒฝ์šฐ ์ปจํ…์ธ ๋Š” ์ž๋™์œผ๋กœ ์ •๋ ฌ๋ฉ๋‹ˆ๋‹ค.
ย 
Card decks(์นด๋“œ ๋ฐํฌ) (์˜ˆ์ œ ๊ณ„์†)
ย 
<div class="card-deck"> <div class="card"> <img class="card-img-top" src="..." alt="Card image cap"> <div class="card-body"> <h4 class="card-title">Card title</h4> <p class="card-text"> This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. </p> <p class="card-text"> <small class="text-muted">Last updated 3 mins ago</small> </p> </div> </div> <div class="card"> <img class="card-img-top" src="..." alt="Card image cap"> <div class="card-body"> <h4 class="card-title">Card title</h4> <p class="card-text"> This card has supporting text below as a natural lead-in to additional content. </p> <p class="card-text"> <small class="text-muted">Last updated 3 mins ago</small> </p> </div> </div> <div class="card"> <img class="card-img-top" src="..." alt="Card image cap"> <div class="card-body"> <h4 class="card-title">Card title</h4> <p class="card-text"> This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action. </p> <p class="card-text"> <small class="text-muted">Last updated 3 mins ago</small> </p> </div> </div> </div>
ย 
notion imagenotion image
ย 
ย 
Card decks(์นด๋“œ ๋ฐํฌ)(์˜ˆ์ œ๊ณ„์†)
ย 
<div class="card-deck"> <div class="card"> <img class="card-img-top" src="..." alt="Card image cap"> <div class="card-body"> <h4 class="card-title">Card title</h4> <p class="card-text"> This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. </p> </div> <div class="card-footer"> <small class="text-muted">Last updated 3 mins ago</small> </div> </div> <div class="card"> <img class="card-img-top" src="..." alt="Card image cap"> <div class="card-body"> <h4 class="card-title">Card title</h4> <p class="card-text"> This card has supporting text below as a natural lead-in to additional content. </p> </div> <div class="card-footer"> <small class="text-muted">Last updated 3 mins ago</small> </div> </div> <div class="card"> <img class="card-img-top" src="..." alt="Card image cap"> <div class="card-body"> <h4 class="card-title">Card title</h4> <p class="card-text"> This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action. </p> </div> <div class="card-footer"> <small class="text-muted">Last updated 3 mins ago</small> </div> </div> </div>
ย 
notion imagenotion image
ย 
์นด๋“œ๋Š”ย .card-columns์—์„œ CSS๋ฅผ ์ด์šฉํ•ด ๊ฐ์‹ธ์ฃผ๋ฉด ๋ฒฝ๋Œ ํ˜•์œผ๋กœ ์ •๋ ฌ๋œ ์—ด์„ ๊ตฌ์„ฑ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์นด๋“œ๋Š” flexbox(ํ”Œ๋ ‰์Šค ๋ฐ•์Šค)๊ฐ€ ์•„๋‹Œ CSS ์—ด ์†์„ฑ์„ ์‚ฌ์šฉํ•˜์—ฌ ์‰ฝ๊ฒŒ ์ •๋ ฌ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์นด๋“œ๋Š” ์œ„์—์„œ ์•„๋ž˜๋กœ, ์™ผ์ชฝ์—์„œ ์˜ค๋ฅธ์ชฝ์œผ๋กœ ์ •๋ ฌ๋ฉ๋‹ˆ๋‹ค.
์นด๋“œ ์—ด์ด ์žˆ๋Š” ๋งˆ์ผ๋ฆฌ์ง€๋Š” ๋‹ค๋ฅผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์นด๋“œ๊ฐ€ ์—ด์„ ๊ฐ€๋กœ ์ง€๋ฅด์ง€ ๋ชปํ•˜๊ฒŒ ํ•˜๋ ค๋ฉด
display: inline-block์— column-break-inside: avoid๋กœ์จ ์„ค์ •ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
ย 
<div class="card-columns"> <div class="card"> <img class="card-img-top" src="..." alt="Card image cap"> <div class="card-body"> <h4 class="card-title">Card title</h4> <p class="card-text"> This card has supporting text below as a natural lead-in to additional content. </p> <p class="card-text"> <small class="text-muted"> Last updated 3 mins ago</small></p> </div> </div> <div class="card bg-primary text-white text-center p-3"> <blockquote class="blockquote mb-6"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat.</p> <footer class="blockquote-footer"> <small> Someone famous in <cite title="Source Title"> Source Title</cite> </small> </footer> </blockquote> </div> <div class="card text-center"> <div class="card-body"> <h4 class="card-title">Card title</h4> <p class="card-text"> This card has supporting text below as a natural lead-in to additional content.</p> <p class="card-text"> <small class="text-muted"> Last updated 3 mins ago </small> </p> </div> </div> <div class="card"> <img class="card-img" src="..." alt="Card image"> </div> <div class="card p-3 text-right"> <blockquote class="blockquote mb-8"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p> <footer class="blockquote-footer"> <small class="text-muted"> Someone famous in <cite title="Source Title">Source Title</cite> </small> </footer> </blockquote> </div> <div class="card"> <div class="card-body"> <h4 class="card-title">Card title</h4> <p class="card-text"> This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.</p> <p class="card-text">ht <small class="text-muted"> Last updated 3 mins ago </small> </p> </div> </div> </div>
ย 
notion imagenotion image
ย 
์ถ”๊ฐ€์ ์ธ ์ฝ”๋“œ๋ฅผ ์ด์šฉํ•ด์„œ ์นด๋“œ๋ฅผ ์ปค์Šคํ„ฐ๋งˆ์ด์ง•ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. CSS์˜ .card-columns๋ฅผ ์ด์šฉํ•ด์„œ ์ปค์Šคํ„ฐ ๋งˆ์ด์ง• ํ•ด๋ณด์„ธ์š”.
ย 
.card-columns{ @include media-breakpoint-only(lg) { column-count: 4; } @include media-breakpoint-only(xl) { column-count: 5; }}
ย 

7. ์บ๋Ÿฌ์…€

ย 
์บ๋Ÿฌ์…€์€ ์ด๋ฏธ์ง€๋‚˜ ํ…์ŠคํŠธ ์Šฌ๋ผ์ด๋“œ๋ฅผ ๊ตฌ์„ฑํ•˜๋Š” ์Šฌ๋ผ์ด๋“œ ์‡ผ ์ž…๋‹ˆ๋‹ค. ๋งˆ์ง€๋ง‰ ์บ๋Ÿฌ์…€ ์ด๋ฏธ์ง€์—์„œ๋Š” ๋‹ค์‹œ ์ฒ˜์Œ ์Šฌ๋ผ์ด๋“œ๋กœ ๋Œ์•„์˜ค๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.
๋ถ€ํŠธ์ŠคํŠธ๋žฉ ๊ณต์‹ ํ™ˆํŽ˜์ด์ง€์—์„œ๋Š” ์บ๋Ÿฌ์…€์„ โ€˜CSS 3D ํŠธ๋žœ์Šคํผ๊ณผ ์•ฝ๊ฐ„์˜ ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ๋กœ ์ œ์ž‘๋œ ์‹œ๋ฆฌ์ฆˆ ์ปจํ…์ธ ๋ฅผ ์ˆœํ™˜ํ•˜๋Š” ์Šฌ๋ผ์ด๋“œ ์‡ผโ€™๋ผ๊ณ  ๋งํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์ฃผ์˜ํ•˜์…”์•ผ ํ•  ๋ถ€๋ถ„์€ ์บ๋Ÿฌ์…€์€ ์ค‘์ฒฉ์„ ํ—ˆ๋ฝํ•˜์ง€ ์•Š์œผ๋ฉฐ ์›น ์ ‘๊ทผ์„ฑ ํ‘œ์ค€์„ ์ค€์ˆ˜ํ•˜์ง€ ์•Š๋Š”๋‹ค๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค.ย ๋˜ํ•œ ์†Œ์Šค์—์„œ JS๋ฅผ ๋นŒ๋“œํ•˜๋Š” ๊ฒฝ์šฐ util.js๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.
์บ๋Ÿฌ์…€์€ ์ž๋™์œผ๋กœ ์Šฌ๋ผ์ด๋“œ ํฌ๊ธฐ๋ฅผ ํ‘œ์ค€ํ™”ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ์ปจํ…์ธ ์˜ ํฌ๊ธฐ๋ฅผ ์ ์ ˆํ•˜๊ฒŒ ์กฐ์ •ํ•˜๋ ค๋ฉด ์ถ”๊ฐ€ ์œ ํ‹ธ๋ฆฌํ‹ฐ ๋˜๋Š” ์‚ฌ์šฉ์ž ์ •์˜ ์Šคํƒ€์ผ์„ ์‚ฌ์šฉํ•ด์•ผ ํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.
.active ํด๋ž˜์Šค ์Šฌ๋ผ์ด๋“œ๋‹น ํ•˜๋‚˜์”ฉ ์ถ”๊ฐ€๋˜์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋ ‡์ง€ ์•Š์œผ๋ฉด ์บ๋Ÿฌ์…€์ด ๋ณด์ด์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ํ•˜๋‚˜์˜ ํŽ˜์ด์ง€์— ๋‹ค์–‘ํ•œ ์บ๋Ÿฌ์…€์„ ์‚ฌ์šฉํ•  ๊ฒฝ์šฐ, ์„ ํƒ์ ์ธ ์ปจํŠธ๋กค์„ ์œ„ํ•ด .carousel์— ๊ฐ๊ฐ์˜ ๊ณ ์œ ํ•œ ์•„์ด๋””๋ฅผ ๋ถ€์—ฌํ•ด์ฃผ์„ธ์š”. ์ปจํŠธ๋กค๊ณผ ์ธ๋””์ผ€์ดํ„ฐ ์š”์†Œ๋“ค์˜ ๊ฒฝ์šฐ ๋ฐ˜๋“œ์‹œ .carousel์š”์†Œ์˜ ์•„์ด๋””๋ฅผ ๋งž์ถ”๋Š” ๋ฐ์ดํ„ฐ ๋งž์ถค ์†์„ฑ์„ ๊ฐ€์ ธ์•ผ ํ•ฉ๋‹ˆ๋‹ค.
๋‹ค์Œ์€ ์Šฌ๋ผ์ด๋“œ๋งŒ ์žˆ๋Š” ์บ๋Ÿฌ์…€์ž…๋‹ˆ๋‹ค.
ย 
<div id="carouselExampleSlidesOnly" class="carousel slide" data-ride="carousel"> <div class="carousel-inner"> <div class="carousel-item active"> <img class="d-block w-100" src="..." alt="์ฒซ๋ฒˆ์งธ ์Šฌ๋ผ์ด๋“œ"> </div> <div class="carousel-item"> <img class="d-block w-100" src="..." alt="๋‘๋ฒˆ์งธ ์Šฌ๋ผ์ด๋“œ"> </div> </div> </div>
ย 
notion imagenotion image
ย 
์ด์ „๊ณผ ๋‹ค์Œ ์ปจํŠธ๋กค์ด ํ•„์š”ํ•œ ๊ฒฝ์šฐ ์•„๋ž˜์™€ ๊ฐ™์ด ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
ย 
<div id="carouselExampleControls" class="carousel slide" data-ride="carousel"> <div class="carousel-inner"> <div class="carousel-item active"> <img class="d-block w-100" src="..." alt="์ฒซ๋ฒˆ์งธ ์Šฌ๋ผ์ด๋“œ"> </div> </div> <a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide-"prev"> <span class="carousel-control-prev-icon" aria-hidden="true"></span> <span class="sr-only">์ด์ „ </span> </a> <a class="carousel-control-next href="#carouselExampleControls" role="button" data-slide="next"> <span class="carousel-control-next-icon" aria-hidden="true"></span> <span class="sr-only">๋‹ค์Œ </span> </a> </div>
ย 
notion imagenotion image
ย 
์ปจํŠธ๋กค๊ณผ ํ•จ๊ป˜ ์ธ๋””์ผ€์ดํ„ฐ๋ฅผ ์บ๋Ÿฌ์…€์— ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์Šฌ๋ผ์ด๋“œ ํ•˜๋‹จ์— ๋ณด์ด๋Š” ๊ฒƒ์ด ์ธ๋””์ผ€์ดํ„ฐ ์ž…๋‹ˆ๋‹ค.
ย 
<div id="carouselExample Indicators" class="carousel slide" data-ride-"carousel"> <ol class="carousel-indicators"> <li data-target="#carouselExample Indicators" data-slide-to="0" class="active"></li> <li data-target="#carouselExample Indicators" data-slide-to="1"></li> <li data-target="#carouselExample Indicators" data-slide-to="2"></li> </ol> <div class="carousel-inner"> <div class="carousel-item active"> <img class="d-block w-100" src="..." alt="์ฒซ๋ฒˆ์งธ ์Šฌ๋ผ์ด๋“œ"> </div> <div class="carousel-item"> <img class="d-block w-100" src="..." alt="๋‘๋ฒˆ์งธ ์Šฌ๋ผ์ด๋“œ"> </div> </div> <a class="carousel-control-prev" href="#carouselExample Indicators" role="button" data-slide="prev"> <span class="carousel-control-prev-icon" aria-hidden="true"></span> <span class="sr-only">์ด์ „</span> </a> <a class="carousel-control-next" href="#carousel Example Indicators" role="button" data-slide="next"> <span class="carousel-control-next-icon" aria-hidden="true"></span> <span class="sr-only">๋‹ค์Œ</span> </a> </div>
ย 
notion imagenotion image
ย 
.carousel-item ๋‚ด์— .carousel-caption ์š”์†Œ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์Šฌ๋ผ์ด๋“œ์— ์บก์…˜์„ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์„ ํƒ์ ์œผ๋กœ display utilites๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ž‘์€ ๋ทฐํฌํŠธ์— ์ˆจ๊ธธ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ฒ˜์Œ์—๋Š” .d-none์œผ๋กœ ์ˆจ๊ธฐ๊ณ  .d-md-block์œผ๋กœ ์ค‘๊ฐ ํฌ๊ธฐ์˜ ๋””๋ฐ”์ด์Šค์—์„œ ๋‹ค์‹œ ๊ฐ€์ ธ์˜ต๋‹ˆ๋‹ค.
ย 
<div class="carousel-item"> <img src="..." alt="..."> <div class="carousel-caption d-none d-md-block"> <h3>...</h3> <p>...</p> </div> </div>
ย 
notion imagenotion image
ย 
๋ถ€ํŠธ์ŠคํŠธ๋žฉ์— Crossfade(ํฌ๋กœ์Šค ํŽ˜์ด๋“œ)๋Š” ์ด๋ฏธ์ง€๊ฐ€ animate(์• ๋‹ˆ๋ฉ”์ดํŠธ)๋˜๋Š” ๋Œ€์‹  fadein fadeout๋˜๋Š” fade transition(ํŽ˜์ด๋“œ ํŠธ๋žœ์ง€์…˜)์„ ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค. ์บ๋Ÿฌ์…€์— .carousel-fade ๋ฅผ ์ถ”๊ฐ€ํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.
ย 
<div id="carousel ExampleFade" class="carousel slide carousel-fade" data-ride="carousel"> <div class="carousel-inner"> <div class="carousel-item active"> <img class="d-block w-100" src=".../800x400?auto=yes&bg=777&fg=555&text=First slide" alt="First slide"> </div> </div> <a class="carousel-control-prev" href="#carouselExampleFade" role="button" data-slide-"prev"> <span class="carousel-control-prev-icon" aria-hidden="true"></span> <span class="sr-only">Previous</span> </a> <a class="carousel-control-next" href="#carouselExampleFade" role="button" data-slide="next"> <span class="carousel-control-next-icon" aria-hidden="true"></span> <span class="sr-only">Next</span> </a> </div>
ย 
notion imagenotion image
ย 
๋ฐ์ดํ„ฐ ์†์„ฑ์„ ์‚ฌ์šฉํ•˜์—ฌ ์บ๋Ÿฌ์…€์˜ ์œ„์น˜๋ฅผ ์‰ฝ๊ฒŒ ์ œ์–ดํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. data-slide๋Š” prev ๋˜๋Š” nextย ํ‚ค์›Œ๋“œ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํ˜„์žฌ ์œ„์น˜๋ฅผ ๊ธฐ์ค€์œผ๋กœ ์Šฌ๋ผ์ด๋“œ ์œ„์น˜๋ฅผ ๋ณ€๊ฒฝํ•ฉ๋‹ˆ๋‹ค. ๋˜๋Š” data-slide-to๋ฅผ ์‚ฌ์šฉํ•ด์„œ ์Šฌ๋ผ์ด๋“œ ํฌ์ธํ„ฐ๋ฅผ 0์œผ๋กœ ์‹œ์ž‘ํ•˜๋Š” ํŠน์ • ์ธ๋ฑ์Šค๋กœ ์ด๋™ํ•˜๋Š” ์Šฌ๋ผ์ด๋“œ ํฌ์ธํ„ฐ data-slide-to=โ€œ2โ€์— ์›์‹œ ์Šฌ๋ผ์ด๋“œ ์ธ๋ฑ์Šค๋ฅผ ์ „๋‹ฌํ•ฉ๋‹ˆ๋‹ค.
data-ride="carousel" ์†์„ฑ์€ ์บ๋Ÿฌ์…€ ํŽ˜์ด์ง€ ๋กœ๋“œ์‹œ ์• ๋‹ˆ๋ฉ”์ด์…˜์œผ๋กœ ํ‘œ์‹œํ•˜๋Š”๋ฐ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. ๋™์ผํ•œ ์บ๋Ÿฌ์…€์„ JavaScript ์ดˆ๊ธฐํ™” (์ค‘๋ณต ๋ฐ ๋ถˆํ•„์š”ํ•œ)๋ฐฉ์‹๊ณผ ํ•จ๊ป˜ ์‚ฌ์šฉํ•  ์ˆ˜๋Š” ์—†์Šต๋‹ˆ๋‹ค.
Via JavaScript(JavaScript ๋ฐฉ์‹):
$('.carousel').carousel() ๋ฅผย ์‚ฌ์šฉํ•ด์„œ ์ˆ˜๋™์œผ๋กœ ์บ๋Ÿฌ์…€์„ ํ˜ธ์ถœํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
ย 

8. ๋งˆ๋ฌด๋ฆฌํ•˜๋ฉฐ

๋ถ€ํŠธ์ŠคํŠธ๋žฉ์— ๋ชจ๋“  ๊ธฐ๋Šฅ์„, ๋ชจ๋“  ๋ฌธ๋ฒ•์„ ๋‹ค ์ตํžˆ๊ณ  ์ˆ™๋ จ๋˜์•ผ๋งŒ ๋ถ€ํŠธ์ŠคํŠธ๋žฉ์„ ์ž˜ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์„๊นŒ์š”? ๊ทธ๋ ‡์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ๋ถ€ํŠธ์ŠคํŠธ๋žฉ ์œ ๋ฌด๋ฃŒ ํ…œํ”Œ๋ฆฟ์„ ๋‹ค์šด๋กœ๋“œ ๋ฐ›๋Š” ๋ฐฉ๋ฒ•์ด ์žˆ๊ณ , ๊ทธ ๋ฐฉ๋ฒ•์„ ๋” ์ถ”์ฒœํ•ด ๋“œ๋ฆฝ๋‹ˆ๋‹ค. ์•„๋ฌด๋ฆฌ ์ž˜ ์‚ฌ์šฉํ•˜๋”๋ผ๋„, ์ „๋ฌธ๊ฐ€์˜ ์†๊ธธ๋ณด๋‹ค ๋›ฐ์–ด๋‚˜๊ฒŒ ํ™ˆํŽ˜์ด์ง€๋ฅผ ์ž‘์„ฑํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. ๊ธฐํšŒ๋น„์šฉ์„ ๊ณ ๋ คํ•˜์—ฌ, 2๋งŒ์› ~ 3๋งŒ์›์— ๋ถ€ํŠธ์ŠคํŠธ๋žฉ ํ…œํ”Œ๋ฆฟ์„ ๋‹ค์šด๋กœ๋“œ ๋ฐ›๋Š” ๋‹ค๋Š” ๊ฒƒ์€ ํ›Œ๋ฅญํ•œ ๋Œ€์•ˆ์ด ๋  ๊ฒƒ์ด์—์š”.
๊ทธ๋ž˜๋„ ์ฒ˜์Œ๋ถ€ํ„ฐ ๋๊นŒ์ง€ ์ง์ ‘ ๋งŒ๋“ค๊ณ  ์‹ถ์œผ์‹œ๋‹ค๋ฉด, ๋ถ€ํŠธ์ŠคํŠธ๋žฉ ๋ณด๋‹ค๋Š” ์ง์ ‘ ํ•œ๋•€ํ•œ๋•€ ์ฒ˜์Œ๋ถ€ํ„ฐ ๋๊นŒ์ง€ ๋งŒ๋“ค์–ด๋ณด์‹œ๊ธธ ๊ถŒํ•ด๋“œ๋ฆฝ๋‹ˆ๋‹ค.