728x90
๋ฐ์ํ ์น์ ๋งํฌ์ ์ฒ๋ฆฌํ๊ธฐ ์ํด์ ๋ถํธ์คํธ๋ฉ์ ๊ฟํ ์ด๋ค.
๋ฒํผ · Bootstrap v5.1 (getbootstrap.kr)
<์ด๊ฐ๋จ ๋ถํธ์คํธ๋ฉ> start ๋๋ฅด๋ฉด ์ ์ผ ์ฒ์ ํด๋์ด์ผ ํ ์ธํ 1. css ๋ณต์ฌํด์ ํค๋ ์์ style link ์์ ๋ถ์ฌ๋ฃ๊ธฐ 2.js ๋ณต์ฌํด์ ๋ฐ๋ ์์ JSํ์ผ ์์ ๋ถ์ฌ๋ฃ๊ธฐ
๋ฒํผ
๋ค์ํ ํฌ๊ธฐ, ์ํ ๋ฑ์ ์ง์ํ๋ ํผ, ๋ํ์์ ๋ฑ์ ์์ ์ Bootstrap์ ์ฌ์ฉ์ ์ง์ ๋ฒํผ ์คํ์ผ์ ์ฌ์ฉํ์ธ์.
getbootstrap.kr
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
1. ์์ ์ค์ Head ํ๊ทธ ์์ ๋ณต๋ถ
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
2. ์์ ์ค์ </body> ๋ฐ~๋ก ์์ ๋ณต๋ถ!
3. ์ํ๋ ๊ฒ๋ค์ body ์์ ๋ง~์~๊ป~ ๊ฐ๋ค ๋ถ์ธ๋ค.
<button type="button" class="btn btn-primary">Primary</button>
-๋ถํธ์คํธ๋ฉ ๋-!
๊ณ ์์ด ๋ฐ์ํ ๋ด์ํ์์ฆ ์์
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Bbokkie Times</title>
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin="anonymous"
/>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<section class="container">
<section>
<div class="head-line">
<svg viewBox="0 0 184 25" fill="#000">
<path
d="M13.8 2.9c0-2-1.9-2.5-3.4-2.5v.3c.9 0 1.6.3 1.6 1 0 .4-.3 1-1.2 1-.7 0-2.2-.4-3.3-.8C6.2 1.4 5 1 4 1 2 1 .6 2.5.6 4.2c0 1.5 1.1 2 1.5 2.2l.1-.2c-.2-.2-.5-.4-.5-1 0-.4.4-1.1 1.4-1.1.9 0 2.1.4 3.7.9 1.4.4 2.9.7 3.7.8v3.1L9 10.2v.1l1.5 1.3v4.3c-.8.5-1.7.6-2.5.6-1.5 0-2.8-.4-3.9-1.6l4.1-2V6l-5 2.2C3.6 6.9 4.7 6 5.8 5.4l-.1-.3c-3 .8-5.7 3.6-5.7 7 0 4 3.3 7 7 7 4 0 6.6-3.2 6.6-6.5h-.2c-.6 1.3-1.5 2.5-2.6 3.1v-4.1l1.6-1.3v-.1l-1.6-1.3V5.8c1.5 0 3-1 3-2.9zm-8.7 11l-1.2.6c-.7-.9-1.1-2.1-1.1-3.8 0-.7 0-1.5.2-2.1l2.1-.9v6.2zm10.6 2.3l-1.3 1 .2.2.6-.5 2.2 2 3-2-.1-.2-.8.5-1-1V9.4l.8-.6 1.7 1.4v6.1c0 3.8-.8 4.4-2.5 5v.3c2.8.1 5.4-.8 5.4-5.7V9.3l.9-.7-.2-.2-.8.6-2.5-2.1L18.5 9V.8h-.2l-3.5 2.4v.2c.4.2 1 .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5 1.6 1.4v6l-.7.7 2.3 2.1 3.1-2.1v-.3zm8.7-1.5l-2.5 1.9-2.5-2v-1.2l4.7-3.2v-.1l-2.4-3.6-5.2 2.8v6.8l3.5 2.5 4.5-3.6-.1-.3zm-5-1.7V8.5l.2-.1 2.2 3.5-2.4 1.5zm14.1-.9l-1.9-1.5c1.3-1.1 1.8-2.6 1.8-3.6v-.6h-.2c-.2.5-.6 1-1.4 1-.8 0-1.3-.4-1.8-1L176 9.3v3.6l1.7 1.3c-1.7 1.5-2 2.5-2 3.3 0 1 .5 1.7 1.3 2l.1-.2c-.2-.2-.4-.3-.4-.8 0-.3.4-.8 1.2-.8 1 0 1.6.7 1.9 1l4.3-2.6v-3.6h-.1zm-1.1-3c-.7 1.2-2.2 2.4-3.1 3l-1.1-.9V8.1c.4 1 1.5 1.8 2.6 1.8.7 0 1.1-.1 1.6-.4zm-1.7 8c-.5-1.1-1.7-1.9-2.9-1.9-.3 0-1.1 0-1.9.5.5-.8 1.8-2.2 3.5-3.2l1.2 1 .1 3.6z"
></path>
</svg>
</div>
<div class="menus">
<button>Sport</button>
<button>Tech</button>
<button>World</button>
<button>Finance</button>
<button>Politics</button>
<button>Business</button>
<button>Economics</button>
<button>Entertainment</button>
<button>Beauty</button>
<button>Travel</button>
<button>Music</button>
<button>Food</button>
<button>Science</button>
<button>Gaming</button>
<button>Energy</button>
</div>
</section>
<section id="news-board">
<div class="row news">
<!--๋ถํธ์คํธ๋ฉ : ์์๋ค์ ํ์ค๋ก ์ทจ๊ธ https://getbootstrap.kr/docs/5.1/layout/grid/-->
<div class="col-lg-4">
<img
class="news-img-size"
src="https://s3.ap-northeast-2.amazonaws.com/elasticbeanstalk-ap-northeast-2-176213403491/media/magazine_img/magazine_302/104_%E1%84%8A%E1%85%A5%E1%86%B7%E1%84%82%E1%85%A6%E1%84%8B%E1%85%B5%E1%86%AF.jpg"
/>
</div>
<div class="col-lg-8">
<h2>์ค๋์์ด ๊ณ ์์ด</h2>
<p>๊ณ ์์ด๊ฐ ์ธ์์ ๊ตฌํ๋ค๊ณ ํ๋ค</p>
<div>์ถ์ฒ : ๋ด ๋ง์</div>
</div>
</div>
<div class="row news">
<!--๋ถํธ์คํธ๋ฉ : ์์๋ค์ ํ์ค๋ก ์ทจ๊ธ https://getbootstrap.kr/docs/5.1/layout/grid/-->
<div class="col-lg-4">
<img
class="news-img-size"
src="https://s3.ap-northeast-2.amazonaws.com/elasticbeanstalk-ap-northeast-2-176213403491/media/magazine_img/magazine_302/104_%E1%84%8A%E1%85%A5%E1%86%B7%E1%84%82%E1%85%A6%E1%84%8B%E1%85%B5%E1%86%AF.jpg"
/>
</div>
<div class="col-lg-8">
<h2>์ค๋์์ด ๊ณ ์์ด</h2>
<p>๊ณ ์์ด๊ฐ ์ธ์์ ๊ตฌํ๋ค๊ณ ํ๋ค</p>
<div>์ถ์ฒ : ๋ด ๋ง์</div>
</div>
</div>
<div class="row news">
<!--๋ถํธ์คํธ๋ฉ : ์์๋ค์ ํ์ค๋ก ์ทจ๊ธ https://getbootstrap.kr/docs/5.1/layout/grid/-->
<div class="col-lg-4">
<img
class="news-img-size"
src="https://s3.ap-northeast-2.amazonaws.com/elasticbeanstalk-ap-northeast-2-176213403491/media/magazine_img/magazine_302/104_%E1%84%8A%E1%85%A5%E1%86%B7%E1%84%82%E1%85%A6%E1%84%8B%E1%85%B5%E1%86%AF.jpg"
/>
</div>
<div class="col-lg-8">
<h2>์ค๋์์ด ๊ณ ์์ด</h2>
<p>๊ณ ์์ด๊ฐ ์ธ์์ ๊ตฌํ๋ค๊ณ ํ๋ค</p>
<div>์ถ์ฒ : ๋ด ๋ง์</div>
</div>
</div>
</section>
</section>
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin="anonymous"
></script>
<script src="main.js"></script>
</body>
</html>
.head-line {
margin-top: 3em;
display: flex;
justify-content: center;
}
.head-line svg {
width: 600px;
}
.menus {
margin-top: 1em;
display: flex;
justify-content: center;
flex-wrap: wrap;
border-top: 1px solid #ebebeb;
border-bottom: 4px double #000;
}
.menus button {
border: none;
background: none;
margin: 5px;
}
.menus button:hover {
background-color: #d2cccc;
}
.news-img-size {
max-width: 100%;
max-height: 250px;
}
.news {
border-bottom: 1px solid #d2cccc;
}
728x90
'๋งํฌ์ > Html & Css' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
CSS์ ๋ ์ด์์ display (0) | 2022.03.21 |
---|---|
CSS ๊ธฐ์ด ๊ธฐ๋ณธ (0) | 2022.03.20 |
HTML ๊ฐ์ข ํ๊ทธ ์ฐ์ต (0) | 2022.03.17 |
์นํ์ด์ง๋ฅผ ์ธํฐ๋ท์ ๊ณต๊ฐํ๊ธฐ (0) | 2022.03.12 |
HTML ๊ฐ์ข ํ๊ทธ ์ดํดํ๊ธฐ, ํํ์ด์ง HTML๋ฌธ์ ๊ตฌ๊ฒฝํ๊ธฐ (0) | 2022.03.11 |