๋ ์ด์์ : ํ ์คํธ ์ ํ01
๋ค์๊ณผ ๊ฐ์ ํ ์คํธ ์ ํ์ ๋ ์ด์์์ ์์ ํด ๋ณด๋๋ก ํ๊ฒ ์ต๋๋ค.
HTML ์์ค
๋จผ์ , container ๋ฐ์ค๋ฅผ ๋ง๋ค์ด ์ฃผ๊ณ , ๊ทธ ์์ text__card ํด๋์ค๋ช ์ ๊ฐ์ง div ๋ฐ์ค๋ฅผ ๋ง๋ค์ด ์ฃผ์์ต๋๋ค. ์ด 6๊ฐ์ ์นด๋๋ฅผ ๋ง๋ ๋ค, ๊ฐ๊ฐ์ ์นด๋ ์์๋ ์์ด์ฝ๊ณผ ์ ๋ชฉ, ์ค๋ช , ๋๋ณด๊ธฐ ๋ฒํผ์ ์ถ๊ฐํด ์ฃผ์์ต๋๋ค.
<section id="textType01" class="container section nexon">
<p>ํ
์คํธ ์ ํ01</p>
<h2>์ธ์์ ๊ท์ฌ์ด ๋๋์ด</h2>
<div class="text__card">
<div class="card top">
<div class="icon"></div>
<h3 class="title">์ธ์์ ๊ท์ฌ์ด ๋๋์ด</h3>
<p class="desc">์ธ์์ ๊ท์ฌ์ด ๋๋์ด... ๋๋์ด ์ด์ผ๊ธฐ๋ง ๋ช<br>
๋ฒ์งธ์ธ์ง... ๋๋์ด ๊ธ์๋ฅผ ๋ณด๋ฉด ๊ฒ์ํํธ ๋ถ<br>
๊ดด ํ์์ด ์ผ์ด๋ ๊ฒ๋ง ๊ฐ๋ค. ์ธ ์ค ํจ๊ณผ๋ฅผ ์ํด์ ์กฐ๊ธ ๋</p>
<a class="more" href="#">๋๋ณด๊ธฐ</a>
</div>
<div class="card top ce">
<div class="icon icon02"></div>
<h3 class="title">์ธ์์ ๊ท์ฌ์ด ์ผ์น์ด</h3>
<p class="desc">์ธ์์ ๊ท์ฌ์ด ๋๋์ด... ๋๋์ด ์ด์ผ๊ธฐ๋ง ๋ช<br>
๋ฒ์งธ์ธ์ง... ๋๋์ด ๊ธ์๋ฅผ ๋ณด๋ฉด ๊ฒ์ํํธ ๋ถ<br>
๊ดด ํ์์ด ์ผ์ด๋ ๊ฒ๋ง ๊ฐ๋ค. ์ธ ์ค ํจ๊ณผ๋ฅผ ์ํด์ ์กฐ๊ธ ๋</p>
<a class="more" href="#">๋๋ณด๊ธฐ</a>
</div>
<div class="card top">
<div class="icon icon03"></div>
<h3 class="title">์ธ์์ ๊ท์ฌ์ด ์์ญ์ด</h3>
<p class="desc">์ธ์์ ๊ท์ฌ์ด ๋๋์ด... ๋๋์ด ์ด์ผ๊ธฐ๋ง ๋ช<br>
๋ฒ์งธ์ธ์ง... ๋๋์ด ๊ธ์๋ฅผ ๋ณด๋ฉด ๊ฒ์ํํธ ๋ถ<br>
๊ดด ํ์์ด ์ผ์ด๋ ๊ฒ๋ง ๊ฐ๋ค. ์ธ ์ค ํจ๊ณผ๋ฅผ ์ํด์ ์กฐ๊ธ ๋</p>
<a class="more" href="#">๋๋ณด๊ธฐ</a>
</div>
<div class="card">
<div class="icon icon04"></div>
<h3 class="title">์ธ์์ ๊ท์ฌ์ด ๊ณ ์ด๋์น</h3>
<p class="desc">์ธ์์ ๊ท์ฌ์ด ๋๋์ด... ๋๋์ด ์ด์ผ๊ธฐ๋ง ๋ช<br>
๋ฒ์งธ์ธ์ง... ๋๋์ด ๊ธ์๋ฅผ ๋ณด๋ฉด ๊ฒ์ํํธ ๋ถ<br>
๊ดด ํ์์ด ์ผ์ด๋ ๊ฒ๋ง ๊ฐ๋ค. ์ธ ์ค ํจ๊ณผ๋ฅผ ์ํด์ ์กฐ๊ธ ๋</p>
<a class="more" href="#">๋๋ณด๊ธฐ</a>
</div>
<div class="card ce">
<div class="icon icon05"></div>
<h3 class="title">์ด ์๊น ๋ ์ํ์ฃ ?</h3>
<p class="desc">์ธ์์ ๊ท์ฌ์ด ๋๋์ด... ๋๋์ด ์ด์ผ๊ธฐ๋ง ๋ช<br>
๋ฒ์งธ์ธ์ง... ๋๋์ด ๊ธ์๋ฅผ ๋ณด๋ฉด ๊ฒ์ํํธ ๋ถ<br>
๊ดด ํ์์ด ์ผ์ด๋ ๊ฒ๋ง ๊ฐ๋ค. ์ธ ์ค ํจ๊ณผ๋ฅผ ์ํด์ ์กฐ๊ธ ๋</p>
<a class="more" href="#">๋๋ณด๊ธฐ</a>
</div>
<div class="card">
<div class="icon icon06"></div>
<h3 class="title">์ธ์์ ๊ท์ฌ์ด ์ฝ๋ผ๋ฆฌ</h3>
<p class="desc">์ธ์์ ๊ท์ฌ์ด ๋๋์ด... ๋๋์ด ์ด์ผ๊ธฐ๋ง ๋ช<br>
๋ฒ์งธ์ธ์ง... ๋๋์ด ๊ธ์๋ฅผ ๋ณด๋ฉด ๊ฒ์ํํธ ๋ถ<br>
๊ดด ํ์์ด ์ผ์ด๋ ๊ฒ๋ง ๊ฐ๋ค. ์ธ ์ค ํจ๊ณผ๋ฅผ ์ํด์ ์กฐ๊ธ ๋</p>
<a class="more" href="#">๋๋ณด๊ธฐ</a>
</div>
</div>
</section>
CSS ์์ค
ํฐํธ๋ ๋ฅ์จ Lv1 ๊ณ ๋์ ์ฌ์ฉํ์๊ณ , display: flex์ flex-wrap์ ์ด์ฉํ์ฌ ์นด๋๋ค์ ๊ฐ๋ก๋ก ๋ฐฐ์นํ์์ต๋๋ค. ์์ด์ฝ์ ๋ฐฑ๊ทธ๋ผ์ด๋ ํ์์ผ๋ก ์์ ํด ์ฃผ์๊ณ , ์์ด์ฝ์ ๋ด๊ธด ์๋ฏธ๋ ํน๋ณํ ์๊ธฐ ๋๋ฌธ์ irํจ๊ณผ๋ ์๋ตํ์ต๋๋ค. ๊ฐ๊ฐ์ ์นด๋๋ค์ ๋ง์ฐ์ค๋ฅผ ๋๋ฉด ๋ฐฐ๊ฒฝ ์์์ด ๋ฐ๋๋๋ก hover ํจ๊ณผ๋ ์์ ํด ์ฃผ์์ต๋๋ค.
.nexon {
font-family: 'NexonLv1Gothic';
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: 70px;
}
.section>p {
font-size: 22px;
font-weight: 300;
color: #666;
text-align: center;
margin-bottom: 70px;
}
/* textType01 */
#textType01>p {
font-size: 16px;
color: #000;
font-weight: normal;
text-decoration-line: underline;
margin-bottom: 10px;
}
.text__card {
display: flex;
flex-wrap: wrap;
flex-direction: space-between;
}
.text__card .card {
width: 373px;
height: 260px;
background-color: white;
border-radius: 10px;
position: relative;
}
.text__card .card:hover{
background-color: #efefef;
}
.text__card .card.top {
margin-bottom: 20px;
}
.text__card .card.ce {
margin-left: 20px;
margin-right: 20px;
}
.text__card .card .icon {
position: absolute;
top: 20px;
left: 20px;
width: 60px;
height: 60px;
background-color: #B7C7FF;
border-radius: 50%;
margin-bottom: 10px;
background: url(img/card01_icon01.svg) no-repeat;
}
.text__card .card .icon.icon02 {
background-position: -60px 0;
}
.text__card .card .icon.icon03 {
background-position: -120px 0;
}
.text__card .card .icon.icon04 {
background-position: -180px 0;
}
.text__card .card .icon.icon05 {
background-position: -240px 0;
}
.text__card .card .icon.icon06 {
background-position: -300px 0;
}
.text__card .card .title {
font-size: 24px;
position: absolute;
left: 20px;
top: 90px;
}
.text__card .card .desc {
font-size: 18px;
color: #666;
font-weight: 300;
line-height: 140%;
position: absolute;
left: 20px;
top: 128px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
.text__card .card .more {
font-size: 16px;
font-weight: 300;
color: #666;
text-decoration-line: underline;
position: absolute;
left: 20px;
bottom: 20px;
}
๊ฒฐ๊ณผ
'WebSite' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
์น์ฌ์ดํธ ๋ง๋ค๊ธฐ : ํ ์คํธ ์ ํ ๋ ์ด์์03 (3) | 2022.09.01 |
---|---|
์น์ฌ์ดํธ ๋ง๋ค๊ธฐ : ํ ์คํธ ์ ํ ๋ ์ด์์02 (5) | 2022.08.31 |
์น์ฌ์ดํธ ๋ง๋ค๊ธฐ : ์ด๋ฏธ์ง ์ ํ ๋ ์ด์์03 (11) | 2022.08.19 |
์น์ฌ์ดํธ ๋ง๋ค๊ธฐ : ์ด๋ฏธ์ง ์ ํ ๋ ์ด์์02 (5) | 2022.08.17 |
์น์ฌ์ดํธ ๋ง๋ค๊ธฐ : ์ด๋ฏธ์ง ์ ํ ๋ ์ด์์01 (4) | 2022.08.17 |
๋๊ธ