๋ ์ด์์ : ํ ์คํธ ์ ํ02
๋ค์๊ณผ ๊ฐ์ ํ ์คํธ ์ ํ์ ๋ ์ด์์์ ์์ ํด ๋ณด๋๋ก ํ๊ฒ ์ต๋๋ค.
HTML ์์ค
๋จผ์ , ์ปจํ ์ด๋ ๋ฐ์ค ์์ title๊ณผ contents ๋ฐ์ค๋ฅผ ๋ง๋ค์ด์ค ๋ค, section ํด๋์ค์ display: flex, space-between ์์ฑ์ ์ถ๊ฐํด ๋ ์ด์์์ ๋ฐฐ์นํ์ต๋๋ค. title ์์๋ sub title ์์, title, desc๋ฅผ ๋ง๋ค์ด ์ฃผ์์ต๋๋ค. contents๋ top๊ณผ bottom์ผ๋ก ๋๋์ด, ๊ฐ๊ฐ ๋ ๊ฐ์ card๊ฐ ๋ฐฐ์น๋๋๋ก ์์ ํด ์ฃผ์์ต๋๋ค.
<section id="textType02" class="container section gmark">
<div id="title">
<p class="title__sub">TEXT TYPE02</p>
<h2 class="title__title">๊ท์ฌ์ด ๋๋ฌผ๋ค ์ ๋ฌธ๊ณผ์ </h2>
<p class="title__desc">์ธ์์ ๊ท์ฌ์ด ๋๋์ด... ๊ท์ฌ์ด ๊ณ ์์ด...
๊ท์ฌ์ด ๋ค๋์ฅ... ๊ท์ฌ์ด ๊ณ ๋ผ๋...
๊ท์ฌ์ด ์ํ์นด... ๊ท์ฌ์ด ๊ณ ๋ฆด๋ผ...</p>
</div>
<div id="contents">
<div class="card__top">
<div class="card right">
<div class="icon"></div>
<h2 class="card__title">์ธ์์ ๊ท์ฌ์ด ๋๋์ด</h2>
<p class="card__desc">๊ท, ๊ท, ๊ท ์๋ก ๋๋๋ ๋ง์ ์ผ์ชฝ ๊ท, ์ค๋ฅธ์ชฝ ๊ท, ๋ด ๊ท, ๋จ์ ๊ท, ๊ฐ์์ง ๊ท, ๊ณ ์์ด ๊ท, ๊ณ ๋ผ๋ ๊ท, ์ํ์นด ๊ท, ๊ณ ๋ฆด๋ผ ๊ท, ๊ทธ๋ฆฌ๊ณ ๋... ์ธ์คํจ๊ณผ ๋ฃ์ด์ ๋ ์จ์ผ ํ๋๋ฐ...</p>
</div>
<div class="card">
<div class="icon icon02"></div>
<h2 class="card__title">์ธ์์ ๊ท์ฌ์ด ๊ณ ์์ด</h2>
<p class="card__desc">๊ท, ๊ท, ๊ท ์๋ก ๋๋๋ ๋ง์ ์ผ์ชฝ ๊ท, ์ค๋ฅธ์ชฝ ๊ท, ๋ด ๊ท, ๋จ์ ๊ท, ๊ฐ์์ง ๊ท, ๊ณ ์์ด ๊ท, ๊ณ ๋ผ๋ ๊ท, ์ํ์นด ๊ท, ๊ณ ๋ฆด๋ผ ๊ท, ๊ทธ๋ฆฌ๊ณ ๋... ์ธ์คํจ๊ณผ ๋ฃ์ด์ ๋ ์จ์ผ ํ๋๋ฐ...</p>
</div>
</div>
<div class="card__bottom">
<div class="card right">
<div class="icon icon03"></div>
<h2 class="card__title">์ธ์์ ๊ท์ฌ์ด ๋ค๋์ฅ</h2>
<p class="card__desc">๊ท, ๊ท, ๊ท ์๋ก ๋๋๋ ๋ง์ ์ผ์ชฝ ๊ท, ์ค๋ฅธ์ชฝ ๊ท, ๋ด ๊ท, ๋จ์ ๊ท, ๊ฐ์์ง ๊ท, ๊ณ ์์ด ๊ท, ๊ณ ๋ผ๋ ๊ท, ์ํ์นด ๊ท, ๊ณ ๋ฆด๋ผ ๊ท, ๊ทธ๋ฆฌ๊ณ ๋... ์ธ์คํจ๊ณผ ๋ฃ์ด์ ๋ ์จ์ผ ํ๋๋ฐ...</p>
</div>
<div class="card">
<div class="icon icon04"></div>
<h2 class="card__title">์ธ์์ ๊ท์ฌ์ด ๊ณ ๋ผ๋</h2>
<p class="card__desc">๊ท, ๊ท, ๊ท ์๋ก ๋๋๋ ๋ง์ ์ผ์ชฝ ๊ท, ์ค๋ฅธ์ชฝ ๊ท, ๋ด ๊ท, ๋จ์ ๊ท, ๊ฐ์์ง ๊ท, ๊ณ ์์ด ๊ท, ๊ณ ๋ผ๋ ๊ท, ์ํ์นด ๊ท, ๊ณ ๋ฆด๋ผ ๊ท, ๊ทธ๋ฆฌ๊ณ ๋... ์ธ์คํจ๊ณผ ๋ฃ์ด์ ๋ ์จ์ผ ํ๋๋ฐ...</p>
</div>
</div>
</div>
</section>
CSS ์์ค
ํฐํธ๋ ์ง๋ง์ผ ์ฐ์ค๋ฅผ ์ฌ์ฉํ์๊ณ , flex๋ฅผ ์ด์ฉํ์ฌ ๊ฐ๊ฐ์ ์นด๋๋ค์ ๋ฐฐ์นํด ์ฃผ์์ต๋๋ค. ์์ด์ฝ์ ์ด๋ฏธ์ง ์คํ๋ผ์ดํธ ํ์์ผ๋ก ์์ ํด ์ฃผ์๊ณ , ์์ด์ฝ์ ๋ด๊ธด ์๋ฏธ๋ ํน๋ณํ ์๊ธฐ ๋๋ฌธ์ irํจ๊ณผ๋ ์๋ตํ์ต๋๋ค. card์ ๊ฐ๊ฐ์ desc ๋ฐ์ค์๋ ์ธ ์ค ํจ๊ณผ๋ฅผ ์ถ๊ฐํด ์ฃผ์์ต๋๋ค.
#title {
width: 308px;
}
#title .title__sub {
font-size: 12px;
background-color: #FF0000;
color: white;
width: 152px;
height: 24px;
border-radius: 20px;
text-align: center;
line-height: 24px;
font-weight: normal;
margin-bottom: 10px;
}
#title .title__title {
font-weight: bold;
line-height: 120%;
font-size: 50px;
margin-bottom: 35px;
}
#title .title__desc {
font-weight: normal;
font-size: 18px;
line-height: 140%;
}
#contents {
display: flex;
flex-direction: column;
}
#contents .card__top {
display: flex;
margin-bottom: 30px;
}
#contents .card__bottom {
display: flex;
}
#contents .card {
width: 394px;
height: 209px;
}
#contents .card.right {
margin-right: 20px;
}
#contents .card .icon {
width: 60px;
height: 60px;
background: url(img/card01_icon01.svg);
margin-left: 20px;
margin-bottom: 10px;
border-radius: 50%;
}
#contents .card .icon.icon02 {
background-position-x: -60px;
}
#contents .card .icon.icon03 {
background-position-x: -120px;
}
#contents .card .icon.icon04 {
background-position-x: -300px;
}
#contents .card .card__title {
margin-left: 20px;
margin-bottom: 20px;
font-size: 24px;
}
#contents .card .card__desc {
margin-left: 20px;
font-size: 18px;
line-height: 140%;
color: #666;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
๊ฒฐ๊ณผ
'WebSite' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
์น์ฌ์ดํธ ๋ง๋ค๊ธฐ : ํค๋ ์ ํ ๋ ์ด์์01 (7) | 2022.09.01 |
---|---|
์น์ฌ์ดํธ ๋ง๋ค๊ธฐ : ํ ์คํธ ์ ํ ๋ ์ด์์03 (3) | 2022.09.01 |
์น์ฌ์ดํธ ๋ง๋ค๊ธฐ : ํ ์คํธ ์ ํ ๋ ์ด์์01 (6) | 2022.08.30 |
์น์ฌ์ดํธ ๋ง๋ค๊ธฐ : ์ด๋ฏธ์ง ์ ํ ๋ ์ด์์03 (11) | 2022.08.19 |
์น์ฌ์ดํธ ๋ง๋ค๊ธฐ : ์ด๋ฏธ์ง ์ ํ ๋ ์ด์์02 (5) | 2022.08.17 |
๋๊ธ