์ฌ์ดํธ ๋ง๋ค๊ธฐ : ํ ์คํธ ์ ํ STUDY 02
์ด๋ฒ ํฌ์คํ
์์๋ Figma์์ ๋ง๋ ํ
์คํธ ์ ํ ์น์
์ HTML๊ณผ CSS ์ฝ๋๋ก ์ฎ๊ธฐ๋ ์์
์
ํด๋ณด๋๋ก ํ๊ฒ ์ต๋๋ค.
์์ด์ฝ ์ถ๋ ฅ์ ์์ด์ฝ์ด ๋ค์ด๊ฐ ์์ ๋จผ์ ์ฝ๋ฉ์ผ๋ก ๋ง๋ค์ด ๋ธ ํ, ์์ด์ฝ์ ์ด๋ฏธ์ง ์คํ๋ผ์ดํธ ๊ธฐ๋ฒ์ผ๋ก ์ ์์ ๋ฃ๋ ์์ผ๋ก ์ฝ๋ฉ์
์งํํ์์ต๋๋ค.
Figma
๋จผ์ ๋ง๋ค๊ณ ์ ํ๋ ์น ์ฌ์ดํธ์ ๋ชจ์์ Figma๋ผ๋ ํ๋ก๊ทธ๋จ์ ์ด์ฉํ์ฌ ์๋์ ๊ฐ์ด ๋ง๋ค์ด์ฃผ๋๋ก ํ์. ๊ทธ์ ๋์์ ์ด๋ฏธ์ง ์คํ๋ผ์ดํธ์ฉ ์์ด์ฝ SVG๋ฅผ ์ถ๋ ฅํ ํ์ด์ง๋ ๋ฐ๋ก ๋ง๋ค๋๋ก ํ๋ค. ๋ง๋๋ ๋ฐฉ๋ฒ์ ์ง๋ ์ด๋ฏธ์ง ์คํ๋ผ์ดํธ ํฌ์คํ ์ ์ฐธ์กฐํ ๊ฒ.
HTML ์์ค
์น ํ์ค ์ค์๋ฅผ ์ํด ์๋งจํฑ ํ๊ทธ๋ฅผ ์ ๊ทน ์ฌ์ฉํ๋๋ก ํ์. img ํ๊ทธ์ alt์ ๊ฐ์ ํจ๊ณผ๋ฅผ ์ฃผ๊ธฐ ์ํด ์์ด์ฝ์ด ๋ค์ด๊ฐ span ํ๊ทธ์ ํด๋์ค ๊ฐ์ "ir"๋ก ์ค์ ํ์. ์์ธํ ์ค๋ช ์ ์๋ ์์ ์ฝ๋์ ์ฃผ์์ฒ๋ฆฌ ๋ด์ฉ์ ์ฐธ์กฐํ ๊ฒ.
<body>
<section id="cardType02" class="card__wrap gmarket section container">
<div class="card__title">
<div class="subtitle">
<p>FRONTEND</p>
</div>
<h2>ํ๋ก ํธ์ค๋<br>์ ๋ฌธ๊ณผ์ </h2>
<div class="main__desc">
<p>ํ๋ก ํธ์ค๋ ๊ฐ๋ฐ์๋ก ์ทจ์
ํ๊ธฐ ์ํ <br>
์ ๋ฌธ ๊ณผ์ ์
๋๋ค. <br>
์ฌ๋ฌ๋ถ๋ค๋ ๋์ ํด๋ณด์ธ์!</p>
</div>
</div>
<div class="card__inner">
<article class="card">
<div class="card__body">
<span id="card__icon" class="icon__logo1" aria-hidden="์น ๋์์ธ">
<a href="#" class="link1"><span class="ir">์น ๋์์ธ</span></a>
</span>
<h3 class="title">์น ๋์์ธ</h3>
<p class="desc">
์น๋์์ด๋๊ฐ ํฌํจ๋ ์น ๋ฐ ๋ฉํฐ๋ฏธ๋์ด ๋์์ด๋๋ ๋ค๋ฅธ ์ง์
๊ณผ ๋น๊ตํ์ฌ ์๊ธ๊ณผ ๋ณต๋ฆฌํ์์ด ๋ฎ์ ํผ๋ธ๋ฆฌ์ฑ์ ์น ์ฌ์ดํธ๋ฅผ ์ ์ํ
</p>
</div>
</article>
<article class="card">
<div class="card__body">
<span id="card__icon" class="icon__logo3" aria-hidden="ํ๋ก ํธ์ค๋ ๊ฐ๋ฐ์">
<a href="#" class="link3"><span class="ir">ํ๋ก ํธ์ค๋ ๊ฐ๋ฐ์</span></a>
</span>
<h3 class="title">ํ๋ก ํธ์ค๋ ๊ฐ๋ฐ์</h3>
<p class="desc">
์ฌ์ดํธ์ ์ํธ์์ฉํ๋ ๋ชจ๋ ๋ถ๋ถ์ ๋ํ ๊ฐ๋ฐ, ๊ด๋ฆฌ, ์ ์ง ๋ณด์๋ฅผ ํ๋ ๊ฒ ์๋ฃจ์
์ ํ๋ก์ธ์ค๋ฅผ ๊ฐ๋ฐํฉ๋๋ค.
</p>
</div>
</article>
</div>
<div class="card__inner">
<article class="card">
<div class="card__body">
<span id="card__icon" class="icon__logo2" aria-hidden="์น ํผ๋ธ๋ฆฌ์
">
<a href="#" class="link2"><span class="ir">์น ํผ๋ธ๋ฆฌ์
</span></a>
</span>
<h3 class="title">์น ํผ๋ธ๋ฆฌ์
</h3>
<p class="desc">
ํผ๋ธ๋ฆฌ์ฑ์ ์น ์ฌ์ดํธ๋ฅผ ์ ์ํ ๋, ์น ๋์์ด๋๊ฐ ๋์์ธํ ๊ฒ์ ์น ํ์ค์ฑ๊ณผ ์ ๊ทผ์ฑ์ ๋ถํฉํ๋๋ก ์ฌ์ ํ์๋ค.
</p>
</div>
</article>
<article class="card">
<div class="card__body">
<span id="card__icon" class="icon__logo4" aria-hidden="๋ฐฑ์ค๋ ๊ฐ๋ฐ์">
<a href="#" class="link4"><span class="ir">๋ฐฑ์ค๋ ๊ฐ๋ฐ์</span></a>
</span>
<h3 class="title">๋ฐฑ์ค๋ ๊ฐ๋ฐ์</h3>
<p class="desc">
์ฉ์ด ์์ฒด์์ ์ ์ ์๋ฏ์ด, ๋ฐฑ์๋๋ ์น์ฌ์ดํธ๋ ์น ์ ํ๋ฆฌ์ผ์ด์
๋๋ ๋ชจ๋ฐ์ผ ์๋ฃจ์
์ํ๋ก์ธ์ค์ ๊ด๋ จ๋์
๋๋ค.
</p>
</div>
</article>
</div>
</section>
</body>
CSS ์์ค
reset์์ margin๊ฐ๊ณผ padding๊ฐ์ 0์ผ๋ก ์ด๊ธฐํ ์ํค๋ ์์ ๋ถํฐ ์์ํ๋ค. ์์ด์ฝ ์ถ๋ ฅ์ ์ด๋ฏธ์ง ์คํ๋ผ์ดํธ์ IR ํจ๊ณผ๋ฅผ ์ ๊ทน ํ์ฉํ๋๋ก ํ๋ค. ์์ธํ ์ค๋ช ์ ์๋ ์์ ์ฝ๋์ ์ฃผ์์ฒ๋ฆฌ๋ ๋ด์ฉ์ ์ฐธ์กฐํ ๊ฒ.
<style>
/* fonts */
@import url('https://webfontworld.github.io/gmarket/GmarketSans.css');
.gmarket {
font-family: 'GmarketSans';
font-weight: 400;
}
/* reset */
* {
margin: 0;
padding: 0;
}
h1, h2, h3, h4, h5, h6 {
font-weight: normal;
}
a {
text-decoration: none;
color: #000;
}
img {
width: 100%; /* ์ด๋ฏธ์ง ํ์ด๋์จ ๊ฑฐ ์ง์ด๋ฃ๊ธฐ */
}
/* common */
.container {
width: 1600px;
margin: 0 auto;
min-width: 1600px; /* ๋ฐ์ํ ํ ๋ ์์ ์ค ๊ฒ */
}
.section {
padding: 120px 0;
display: flex;
}
.card__title > h2 {
font-size: 70px;
line-height: 1.1;
margin-bottom: 30px;
font-weight: bold;
width: 340px;
}
.card__title .subtitle {
border-radius: 16px;
background-color: #ff3344;
margin-bottom: 20px;
width: 202px;
height: 32px;
}
.card__title .subtitle > p {
font-size: 18px;
font-weight: 500;
text-align: center;
color: #fff;
padding: 6px 0;
}
.main__desc > p {
font-size: 24px;
font-weight: 500;
line-height: 1.4;
width: 372px;
}
/* cardType */
#card__icon {
width: 80px;
height: 80px;
display: block;
border-radius: 100%;
margin-bottom: 10px;
}
/* ์์ด์ฝ ํ๋ํ๋์ ์๊น ๋ฃ์ด์ฃผ๊ธฐ */
.icon__logo1 {
background-color: #dafbeb;
}
.icon__logo2 {
background-color: #e8ffd6;
}
.icon__logo3 {
background-color: #fde2e2;
}
.icon__logo4 {
background-color: #daddfb;
}
.card__title {
margin-right: 200px;
}
.card__body {
box-sizing: border-box;
padding: 20px;
}
.card__body .title {
font-size: 32px;
margin-bottom: 20px;
font-weight: 500;
/* ํ ์ค ํจ๊ณผ */
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
padding-right: 30px; /* ์ ๋ชฉ ๊ธธ์ด์ ธ๋ ํ ์ค ์ ์ง */
}
.card__body .desc {
width: 498px;
font-size: 24px;
font-weight: 300;
line-height: 1.4;
color: #666;
margin-bottom: 72px;
}
/* ir ํจ๊ณผ (์ด๋ฏธ์ง ๋์ฒด ํจ๊ณผ == alt) */
/* ํ๋ฉด์์์๋ ์๋์ค๊ฒ ํจ๊ณผ ๋์์ ์คํฌ๋ฆฐ๋ฆฌ๋๊ธฐ์๋ ์ฝํ๊ฒ ํ๋ ์์
*/
.ir {
display: block;
overflow: hidden;
font-size: 0;
line-height: 0;
text-indent: -9999px;
}
/* ์ด๋ฏธ์ง ์คํ๋ผ์ดํธ */
/* ์์ด์ฝ 5๊ฐ๋ฅผ ์ด์ด ๋ง๋ ํ๋ ์์ SVG๋ก ์ถ์ถํ์ฌ ๊ทธ ์ขํ๊ฐ์ ์๋์ ๊ฐ์ด
์ฎ๊ฒจ๊ฐ๋ฉฐ ์์ด์ฝ ํ๋์ฉ ๋ณด์ด๋๋ก ํ๋ ๊ธฐ๋ฒ */
#card__icon a {
width: 40px;
height: 40px;
display: block;
background: url(img/textType_icon02.svg);
padding: 20px;
}
/* nth-child๊ฐ ๋จนํ์ง ์์ผ๋ a์ ํด๋์ค๊ฐ์ link1, link2... ์ด๋ฐ์์ผ๋ก ๋ฐ๊พธ์ */
#card__icon a.link1 {
background-position: 0px 0;
}
#card__icon a.link2 {
background-position: -100px 0;
}
#card__icon a.link3 {
background-position: -200px 0;
}
#card__icon a.link4 {
background-position: -300px 0;
}
</style>
์ต์ข ๊ฒฐ๊ณผ
'Site' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[์ฌ์ดํธ ๋ง๋ค๊ธฐ] ํค๋ ์ ํ 01 (4) | 2022.09.01 |
---|---|
[์ฌ์ดํธ ๋ง๋ค๊ธฐ] ํ ์คํธ ์ ํ 03 (6) | 2022.09.01 |
[์ฌ์ดํธ ๋ง๋ค๊ธฐ] ํ ์คํธ ์ ํ 01 (3) | 2022.08.30 |
[์ฌ์ดํธ ๋ง๋ค๊ธฐ] ์ด๋ฏธ์ง ์ ํ 03 - ์ด๋ฏธ์ง ์คํ๋ผ์ดํธ & IRํจ๊ณผ ํ์ฉํ๊ธฐ (6) | 2022.08.20 |
[์ฌ์ดํธ ๋ง๋ค๊ธฐ] ์ด๋ฏธ์ง ์ ํ 02 - Transition & Hover ํ์ฉํ๊ธฐ (2) | 2022.08.17 |
๋๊ธ