๋ฐ์ํ
์ฌ์ดํธ ๋ง๋ค๊ธฐ : ํค๋ ์ ํ STUDY 01
์ด๋ฒ ํฌ์คํ ์์๋ Figma์์ ๋ง๋ ํค๋ ์ ํ์ HTML๊ณผ CSS ์ฝ๋๋ก ์ฎ๊ธฐ๋ ์์ ์ ํด๋ณด๋๋ก ํ๊ฒ ์ต๋๋ค.
Figma
๋จผ์ ๋ง๋ค๊ณ ์ ํ๋ ์น ์ฌ์ดํธ์ ๋ชจ์์ Figma๋ผ๋ ํ๋ก๊ทธ๋จ์ ์ด์ฉํ์ฌ ์๋์ ๊ฐ์ด ๋ง๋ค์ด์ฃผ๋๋ก ํ์.
HTML ์์ค
์น ํ์ค ์ค์๋ฅผ ์ํด ์๋งจํฑ ํ๊ทธ๋ฅผ ์ ๊ทน ์ฌ์ฉํ๋๋ก ํ์.
<body>
<section id="headerType" class="header__wrap nexon">
<div class="header__inner">
<div class="header__logo">
<a href="#">web <em>site</em></a>
</div>
<div class="header__menu">
<ul>
<li><a href="#">ํค๋ ์์ญ</a></li>
<li><a href="#">์ฌ๋ผ์ด๋ ์์ญ</a></li>
<li><a href="#">์ด๋ฏธ์ง ์์ญ</a></li>
<li><a href="#">์ปจํ
์ธ ์์ญ</a></li>
<li><a href="#">ํธํฐ ์์ญ</a></li>
</ul>
</div>
<div class="header__member">
<a href="#">๋ก๊ทธ์ธ</a>
</div>
</div>
</section>
</body>
CSS ์์ค
reset์์ margin๊ฐ๊ณผ padding๊ฐ์ 0์ผ๋ก ์ด๊ธฐํ ์ํค๋ ์์ ๋ถํฐ ์์ํ๋ค.
<style>
/* fonts */
@import url('https://webfontworld.github.io/NexonLv1Gothic/NexonLv1Gothic.css');
.nexon {
font-family: 'NexonLv1Gothic';
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%; /* ์ด๋ฏธ์ง ํ์ด๋์จ ๊ฑฐ ์ง์ด๋ฃ๊ธฐ */
}
em, i, address {
font-style: normal;
}
/* common */
.container {
width: 1160px;
padding: 0 20px;
margin: 20px auto;
min-width: 1160px; /* ๋ฐ์ํ ํ ๋ ์์ ์ค ๊ฒ */
}
.section {
padding: 120px 0;
}
.section > h2 {
font-size: 50px;
line-height: 1;
text-align: center;
margin-bottom: 70px;
}
.section > p {
font-size: 16px;
text-align: center;
margin-bottom: 10px;
}
/* headerType */
.header__inner {
width: 100%;
height: 70px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20px;
box-sizing: border-box;
border-bottom: 1px solid #ccc;
}
.header__logo {
width: 20%;
font-size: 30px;
font-weight: 700;
text-transform: uppercase;
}
.header__logo em {
font-size: 18px;
font-weight: 400;
}
.header__menu {
width: 60%;
text-align: center;
}
.header__menu li {
display: inline;
}
.header__menu li a {
padding: 13px 30px;
margin: 0 5px;
transition: background-color 0.3s;
}
.header__menu li a:hover {
background: #f1f1f1;
border-radius: 5px;
}
.header__member {
width: 20%;
text-align: right;
}
.header__member a {
font-size: 16px;
border: 1px solid #000;
padding: 10px 30px;
border-radius: 50px;
transition: all 0.3s ease;
}
.header__member a:hover {
background: #000;
color: #fff;
}
</style>
์ต์ข ๊ฒฐ๊ณผ
๋ฐ์ํ
'Site' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[์ฌ์ดํธ ๋ง๋ค๊ธฐ] ์ฌ๋ผ์ด๋ ์ ํ 01 (7) | 2022.09.05 |
---|---|
[์ฌ์ดํธ ๋ง๋ค๊ธฐ] ์ด๋ฏธ์ง/ํ ์คํธ ์ ํ 01 (8) | 2022.09.01 |
[์ฌ์ดํธ ๋ง๋ค๊ธฐ] ํ ์คํธ ์ ํ 03 (6) | 2022.09.01 |
[์ฌ์ดํธ ๋ง๋ค๊ธฐ] ํ ์คํธ ์ ํ 02 (3) | 2022.09.01 |
[์ฌ์ดํธ ๋ง๋ค๊ธฐ] ํ ์คํธ ์ ํ 01 (3) | 2022.08.30 |
๋๊ธ