์คํ๋ฒ
์ค ๋ก๊ทธ์ธ ํ์ด์ง
์คํ๋ฒ
์ค ๋ก๊ทธ์ธ HTML
<section class="signin">
<h1>๋ก๊ทธ์ธ</h1>
<div class="signin__card">
<h2>
<strong>Welcome!</strong> ์คํ๋ฒ
์ค์ ์ค์ ๊ฒ์ ํ์ํฉ๋๋ค.
</h2>
<form>
<input type="text" placeholder="์์ด๋๋ฅผ ์
๋ ฅํ์ธ์." />
<input type="password" placeholder="๋น๋ฐ๋ฒํธ๋ฅผ ์
๋ ฅํ์ธ์." />
<input type="submit" value="๋ก๊ทธ์ธ" />
<p>
* ๋น๋ฐ๋ฒํธ๋ฅผ ํ ์ฌ์ดํธ์ ๊ฐ์ด ์ฌ์ฉํ ๊ฒฝ์ฐ ๋์ฉ ์ํ์ด ์์ผ๋,<br />
์ ๊ธฐ์ ์ผ๋ก ๋น๋ฐ๋ฒํธ๋ฅผ ๋ณ๊ฒฝํ์ธ์!
</p>
</form>
<div class="actions">
<a href="javascript:void(0)">ํ์๊ฐ์
</a>
<a href="javascript:void(0)">์์ด๋ ์ฐพ๊ธฐ</a>
<a href="javascript:void(0)">๋น๋ฐ๋ฒํธ ์ฐพ๊ธฐ</a>
</div>
</div>
</section>
- input type=text: text ์
๋ ฅ
- input type=password: text ์
๋ ฅํ ๊ฒฝ์ฐ ๊ฐ๋ฆผ ์ฒ๋ฆฌ๋์ด text๊ฐ ์
๋ ฅ๋๋ค.
- input type=submit: ์๋ฒ์ ํผ ํธ๋ค๋ฌ๋ก ํผ ๋ฐ์ดํฐ๋ฅผ ์ ์กํ๋ ์ ์ถ ๋ฒํผ์ ์ ์
์คํ๋ฒ
์ค ๋ก๊ทธ์ธ CSS
.signin {
margin-top: 120px;
padding: 100px 0 150px;
background-image: url("../images/signin_bg.jpg");
background-repeat: no-repeat;
background-position: center;
background-attachment: fixed;
background-size: cover;
}
.signin h1 {
color: #fff;
font-size: 30px;
font-weight: 700;
text-align: center;
margin-bottom: 24px;
}
.signin__card {
width: 500px;
margin: 0 auto;
border-radius: 6px;
background-color: #f6f5f0;
box-shadow: 2px 2px 20px rgba(0, 0, 0, .3);
color: #555;
}
.signin__card h2 {
padding: 30px;
font-size: 18px;
text-align: center;
border-bottom: 1px solid #ddd;
}
.signin__card h2 strong {
font-weight: 700;
color: #006633;
}
.signin__card form {
padding: 30px 22px;
}
.signin__card form input {
width: 100%;
margin-bottom: 12px;
padding: 15px;
border: 1px solid #ddd;
border-radius: 4px;
outline: none;
box-sizing: border-box;
font-size: 14px;
}
.signin__card form [type="submit"] {
background-color: #006633;
border: none;
color: #fff;
font-size: 20px;
cursor: pointer;
}
.signin__card form p {
font-size: 12px;
color: #006633;
text-align: center;
}
.signin__card .actions {
display: flex;
border-top: 1px solid #ddd;
}
.signin__card .actions a {
flex-grow: 1;
flex-basis: 0;
text-align: center;
padding: 20px;
color: #555;
font-size: 14px;
border-right: 1px solid #ddd;
}
.signin__card .actions a:last-child {
border-right: none;
}
.signin__card .actions a:hover {
text-decoration: underline;
}
signin class
- ์์ชฝ ์ธ๋ถ์ฌ๋ฐฑ 120px
- ๋ด๋ถ์ฌ๋ฐฑ ์ 100px ์๋ 150px
- ๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง๋ signin_bg.jpg๋ฅผ ์ฌ์ฉ
- ์ด๋ฏธ์ง๋ฅผ ๋ฐ๋ณตํ์ง ์๋๋ค.
- ์ค์ ์ ๋ ฌ
- ์ด๋ฏธ์ง๋ ๊ณ ์
- ๋ฐฐ๊ฒฝ์ ์ ์ฒด์ ์ธ ๋น์จ์ ๋ง๊ฒ ์กฐ์
h1
- ์์ #fff
- ๊ธ์ ํฌ๊ธฐ๋ 30px
- ๊ธ์ ๊ตต๊ธฐ๋ 700
- ์ข์ฐ ๊ธฐ์ค ์ค์ ์ ๋ ฌ
- ์๋ ์ธ๋ถ ์ฌ๋ฐฑ 24px
signin__card class
- ๊ฐ๋ก 500px
- ์ค์ ์ ๋ ฌ
- ํ
๋๋ฆฌ๋ ๋ฅ๊ธ๊ฒ
- ๋ฐฐ๊ฒฝ์์ #f6f5f0
- ์์ ๊ทธ๋ฆผ์๋ x์ถ ๊ธฐ์ค 2px, y์ถ ๊ธฐ์ค 2px ๊ทธ๋ฆผ์ 20px 30% ํฌ๋ช
๋
- ์ #555
h2
- ๋ด๋ถ์ฌ๋ฐฑ 30px
- ๊ธ์ ํฌ๊ธฐ 18px
- ์ข์ฐ ๊ธฐ์ค ์ค์ ์ ๋ ฌ
- ์๋ ํ
๋๋ฆฌ 1px solid #ddd
strong
- ๊ธ์ ๊ตต๊ธฐ 700
- ์ #006633
form
- ๋ด๋ถ ์ฌ๋ฐฑ ์์๋ 30px ์ข์ฐ 22px
input
- ๊ฐ๋ก 100%
- ์๋ ์ธ๋ถ์ฌ๋ฐฑ 12px
- ๋ด๋ถ์ฌ๋ฐฑ 15px
- ํ
๋๋ฆฌ 1px solid #ddd
- ํ
๋๋ฆฌ 4px๋งํผ ๋ฅ๊ธ๊ฒ
- outline ์ ๊ฑฐ
- border-box size
- ๊ธ์ ํฌ๊ธฐ 14px
[type="submit"]
- ๋ฐฐ๊ฒฝ ์ #006633
- ํ
๋๋ฆฌ ์ ๊ฑฐ
- ์ #fff
- ๊ธ์ ํฌ๊ธฐ 20px
- ์์์ ๋ง์ฐ์ค ์ปค์๋ฅผ ๊ฐ์ ธ๋ค๋๋ฉด ์๊ฐ๋ฝ ์ปค์๋ก ๋ณํ๋ค.
p
- ๊ธ์ ํฌ๊ธฐ 12px
- ์ #006633
- ์ข์ฐ ๊ธฐ์ค ์ค์์ ๋ ฌ
actions class
- ์ํ ์ ๋ ฌ
- ์์ชฝ ํ
๋๋ฆฌ 1px solid #ddd
a
- ์นธ ๋น์จ 1๋ก ๊ฝ ์ฑ์
- ์์๋๋ฌธ์ ๋ณํ๋ ์นธ ํฌ๊ธฐ๋ฅผ ๋ค์ 1๋1 ๋น์จ๋ก ๋ง์ถฐ์ค
- ์ข์ฐ ๊ธฐ์ค ์ค์ ์ ๋ ฌ
- ๋ด๋ถ์ฌ๋ฐฑ 20px
- ์ #555
- ๊ธ์ ํฌ๊ธฐ 14px
- ์ค๋ฅธ์ชฝ ํ
๋๋ฆฌ 1px solid #ddd
a:last-child
- ๋ง์ง๋ง ์ค๋ฅธ์ชฝ ํ
๋๋ฆฌ ์ ๊ฑฐ
a:hover
- aํ๊ทธ์ ๋ง์ฐ์ค ์ปค์๋ฅผ ๊ฐ์ ธ๋ค๋๋ฉด ๋ฐ์ค ์์ฑ
์คํ๋ฒ
์ค ํํ์ด์ง์์ ๋ก๊ทธ์ธ ํ์ด์ง๋ก ์ ์
์คํ๋ฒ
์ค ๋ก๊ทธ์ธ ํ์ด์ง ์ต์ข
์์ฑ