๋ ์ด์์ : ํ ์คํธ ์ ํ03
๋ค์๊ณผ ๊ฐ์ ํ ์คํธ ์ ํ์ ๋ ์ด์์์ ์์ ํด ๋ณด๋๋ก ํ๊ฒ ์ต๋๋ค.
HTML ์์ค
๋จผ์ , ์ปจํ ์ด๋ ๋ฐ์ค ์์ ์ ๋ชฉ์ ์ ์ด ์ฃผ๊ณ , ์นด๋ ๋ถ๋ถ์ contents ๋ฐ์ค๋ฅผ ๋ง๋ค์ด, contents ๋ฐ์ค ์์ ์ธ ๊ฐ์ card๋ฅผ ๋ง๋ค์ด ์ฃผ์์ต๋๋ค. ๊ฐ๊ฐ์ ์นด๋๋ ๋ด์ฉ ๋ถ๋ถ๊ณผ info ๋ถ๋ถ, ๋งํฌ ๋ถ๋ถ์ผ๋ก ๋๋์ด ์ฃผ์์ต๋๋ค. info ๋ฐ์ค๋ icon๊ณผ ์ ๋ณด ๋ถ๋ถ์ผ๋ก ๋๋์ด ์ฃผ์์ต๋๋ค.
<section id="textType03" class="container section nanum">
<h2>์คํฐ๋ ํ๊ธฐ</h2>
<p>์น๋์์ด๋, ์น ํผ๋ธ๋ฆฌ์
, ํ๋ก ํธ์ค๋ ๊ฐ๋ฐ์ ๋ฉค๋ฒ๋ฅผ ์๊ฐํฉ๋๋ค.</p>
<div class="contents">
<article class="card">
<p class="card__desc">๋ถ๊ณผ 3๋ฌ ์ ๋ง ํด๋ ์ฌ๋ฌ ์์ธ๋ค๋ก ์ธํด ์์กด๊ฐ์ด ๋ฐ๋ฐ๋ฅ์ด์๋ ์ ์๊ฒ ์ด ์คํฐ๋๋ ๋๋ฌด ์์คํ ์๊ฐ์ด์์ด์. ๋งค์ผ ๋ง์ ์์ผ๋ก ์ธ๊ณ ์ถ๋ค๋ฅผ ์ธ์ณค๋ ์ ์๋๋ฐ ์ด์ ๋ ์กฐ๊ธ์ด๋๋ง ์ด๊ฒจ๋ผ ์ ์์ ๊ฒ ๊ฐ๋ค์. ๋ค์์ ์ ์๋์ ๋ง๋ฌ์ ๋๋ ๋ง์ด ๋ฐ์ ํด์๋ ์ ๊ฐ ๋์์ผ๋ฉด ์ข๊ฒ ์ด์.</p>
<div class="card__info">
<div class="icon__box">
<div class="card__icon"></div>
</div>
<div class="info__box">
<span class="info__name">์ดํ์ฉ</span>
<span class="info__number">์น์ค 24๊ธฐ</span>
<span class="info__star ir">๋ณ์ด ๋ค์ฏ ๊ฐ</span>
</div>
</div>
<a href="#"><span class="more">์์ธํ ๋ณด๊ธฐ</span></a>
</article>
<article class="card">
<p class="card__desc">์ง์ฌ ํ๊ต๋ ํ์๋ณด๋ค ๋ ๋ง์ด ๋ฐฐ์ด ๊ฑฐ๋ผ๊ณ ์๊ฐํ๊ณ , ๋ฌด์งํ๊ณ ๋ง ์ ๋ฃ๊ณ ์์กด๊ฐ ๋ฐ๋ฅ์ธ ์ ์๊ฒ ํฉํญ๋ ํด ์ฃผ์๊ณ , ๋ฒ๋ฆฌ์ง ์์ ์ฃผ์
์ ๊ฐ์ฌํฉ๋๋ค ์ค!!!!!!!!!
ํ์ฌ์์ ์๋ฆฌ์ง ์๊ณ ,,, ์กด๋ฒํ๊ฒ ์ต๋๋ค!!!!!!!</p>
<div class="card__info">
<div class="icon__box">
<div class="card__icon"></div>
</div>
<div class="info__box">
<span class="info__name">์ดํฌ์ง</span>
<span class="info__number">์น์ค 24๊ธฐ</span>
<span class="info__star ir">๋ณ์ด ๋ค ๊ฐ</span>
</div>
</div>
<a href="#"><span class="more">์์ธํ ๋ณด๊ธฐ</span></a>
</article>
<article class="card">
<p class="card__desc">์ ๊ฐ ๊ฒ์๋ฌ์ ์๋์น ์๊ฒ ์๊พธ ๋ง์ ์๋ฃ๋ ํ์์ด ๋์์์ง๋ง ์ ๋ง ์ ์๋ ๋ง์ ํ๋ฆฐ ๊ฒ ํ๋๋ ์์๋ค๋ ๊ฑฐ ์ ์๊ณ ์์ต๋๋ค,,, ใ
ใ
์ ๊ทธ๋ฆฌ๊ณ ๋ง์ง๋ง ํ๊ณ ์ถ์ ๋ง์ ์ ์๋ฒฝ 5~6์์ ์๋ ในใ
์ฌ๋นผ๋ฏธํ ์ธ๊ฐ์ธ๋ฐ... ์ค์ด๋ ๋ ๋ฌ ๊ณต๋ถํ๋ค๊ณ ...</p>
<div class="card__info">
<div class="icon__box">
<div class="card__icon"></div>
</div>
<div class="info__box">
<span class="info__name">์ ์น์ฐ</span>
<span class="info__number">์น์ค 24๊ธฐ</span>
<span class="info__star ir">๋ณ์ด ๋ค์ฏ ๊ฐ</span>
</div>
</div>
<a href="#"><span class="more">์์ธํ ๋ณด๊ธฐ</span></a>
</article>
</div>
</section>
CSS ์์ค
ํฐํธ๋ ๋๋ ๊ณ ๋์ ์ฌ์ฉํ์๊ณ , display: flex๋ฅผ ์ฌ์ฉํ์ฌ ์ธ ๊ฐ์ ์นด๋๋ฅผ ๋ฐฐ์นํด ์ฃผ์์ต๋๋ค. ์์ด์ฝ๊ณผ ๋ณ์ ์ ์ด๋ฏธ์ง ์คํ๋ผ์ดํธ ๊ธฐ๋ฒ์ ์ฌ์ฉํ์๊ณ , ๋ณ์ ์ ๊ฐ์์ ๋ํ์ฌ ir ํจ๊ณผ๋ฅผ ์ถ๊ฐํด ์ฃผ์์ต๋๋ค.
/* fonts */
@import url('https://webfontworld.github.io/naver/NanumGothic.css');
.nanum {
font-family: 'NanumGothic';
font-weight: 400;
}
/* reset */
* {
margin: 0;
padding: 0;
}
a {
text-decoration: none;
color: #000;
}
img {
width: 100%;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: normal;
}
/* common */
.container {
width: 1160px;
padding: 0 20px;
margin: 0 auto;
}
.section {
padding: 120px 0;
}
.section>h2 {
font-size: 50px;
line-height: 1;
text-align: center;
margin-bottom: 20px;
font-weight: 500;
}
.section>p {
font-size: 22px;
font-weight: 300;
color: #666;
text-align: center;
margin-bottom: 70px;
}
.ir {
display: block;
overflow: hidden;
font-size: 0;
line-height: 0;
text-indent: -9999px;
}
/* textType03 */
body {
background-color: #C7C9FF;
}
.contents {
display: flex;
justify-content: space-between;
}
.contents .card {
width: 373px;
height: 435px;
background-color: #fff;
border-radius: 10px;
position: relative;
}
.contents .card .card__desc {
font-size: 18px;
font-weight: 300;
line-height: 140%;
margin: 30px;
}
.contents .card .card__info {
border-top: 1px solid #666;
border-bottom: 1px solid #666;
position: absolute;
top: 235px;
left: 30px;
padding: 30px 0;
width: 313px;
display: flex;
}
.contents .card .more {
display:inline-block;
color: white;
background-color: #2684ff;
width:118px;
height: 30px;
font-size: 16px;
line-height: 30px;
text-align: center;
border-radius: 20px;
position: absolute;
left: 127px;
bottom: 30px;
}
.contents .card .card__info .card__icon {
width: 60px;
height: 60px;
background: url(img/card03_icon01.svg)
}
.contents .card:nth-child(2) .card__info .card__icon {
background-position-x: -60px;
}
.contents .card:nth-child(3) .card__info .card__icon {
background-position-x: -120px;
}
.contents .card .card__info .info__box {
margin-left: 10px;
}
.contents .card .card__info .info__name {
font-size: 24px;
line-height: 40px;
font-weight: 500;
}
.contents .card .card__info .info__number {
font-size: 16px;
line-height: 35px;
}
.contents .card .card__info .info__star {
width: 100px;
height: 20px;
background: url(img/card03_icon02.svg)
}
.contents .card:nth-child(2) .card__info .info__star {
background-position: -100px;
}
๊ฒฐ๊ณผ
'WebSite' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
์น์ฌ์ดํธ ๋ง๋ค๊ธฐ : ์ด๋ฏธ์ง ํ ์คํธ ์ ํ ๋ ์ด์์01 (7) | 2022.09.01 |
---|---|
์น์ฌ์ดํธ ๋ง๋ค๊ธฐ : ํค๋ ์ ํ ๋ ์ด์์01 (7) | 2022.09.01 |
์น์ฌ์ดํธ ๋ง๋ค๊ธฐ : ํ ์คํธ ์ ํ ๋ ์ด์์02 (5) | 2022.08.31 |
์น์ฌ์ดํธ ๋ง๋ค๊ธฐ : ํ ์คํธ ์ ํ ๋ ์ด์์01 (6) | 2022.08.30 |
์น์ฌ์ดํธ ๋ง๋ค๊ธฐ : ์ด๋ฏธ์ง ์ ํ ๋ ์ด์์03 (11) | 2022.08.19 |
๋๊ธ