๐ ์ผ๋ฐ์ ์ผ๋ก๋ ๋ฏธ๋์ด์ฟผ๋ฆฌ ์์ชฝ์ ๋ชจ๋ฐ์ผ์์
์ด ์ด๋ฃจ์ด์ง์ง๋ง,
๋ด๋งํฌ ์ผํ๋ชฐ์์๋ ๋ฏธ๋์ด์ฟผ๋ฆฌ ๋ฐ๊นฅ์ชฝ์์ ๋ชจ๋ฐ์ผ์์
์ด ์ด๋ฃจ์ด์ง๋ค.
๋ชจ๋ฐ์ผ๋ฒ์ ์ค๊ณ
ํ์ฅ๋ช SVG ์ด๋ฏธ์ง ํ์ผ์ ๊ฒฝ์ฐ, SVG ํ๊ทธ๋ก ๊ตฌ์ฑ๋์ด ์๋ค.
์ด๊ธฐํ ์์ (๋ํดํธ ๊ฐ)
*
= ๋ชจ๋ html
ํ๊ทธ๋ฅผ ๋ปํจbox-sizing: border-box;
= padding
๊ฐ์ ์ํด ๊ณต๊ฐ ํฌ๊ธฐ ๋ฌ๋ผ์ง๋ ๊ฒ ๋ฐฉ์งfont-weigh
= ํฐํธ ๊ตต๊ธฐ / 100๋จ์๋ก ์ฌ๋ผ๊ฐ๊ณ , ์ซ์๊ฐ ๋์์๋ก ๊ตต์ (100~900)vertical-align: middle;
์ด๋ฏธ์ง ํ๋จ ๊ณต๋ฐฑ ์์ ๊ธฐspan
ํ๊ทธ๋ inline
์์๋ฅผ ๊ฐ์ง๊ณ ์์ง๋ง, ๋ด๋งํฌ์ฌ์ดํธ ํ์ block
์ผ๋ก ์ง์ * { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; }
body { overflow: hidden; font-family: sans-serif; color: #585858; }
h1, h2, h3, h4, h5, h6, p { font-weight: 400; }
li { list-style: none; }
a { text-decoration: none; }
img { vertical-align: middle; }
span { display: block; }
header
๋ถ๋ถ ์ค๊ณ
header
์ ๋์ด๊ฐ์ li
ํ๊ทธ ๋์ด๊ฐ์ ํฌํจ์ํค๊ณ ์ ํ ๋ !
(= ์์์ ๋์ด๊ฐ์ ๋ถ๋ชจ๊ฐ ์ธ์ํ๊ฒ ํ๋ ๋ฒ )
li
ํ๊ทธ์ ๋ถ๋ชจ์ธ ul
ํ๊ทธ์ overflow: hidden;
์
๋ ฅ
#header .buttons ul { overflow: hidden; }
ํด๋ฆญํ๋ aํ๊ทธ์ ๋ฒ์๊ฐ liํ๊ทธ๋ฅผ ์ฑ์ฐ๋ ๋ฒ
display
๋ฅผ block
์์๋ก ๋ฐ๊ฟ์ฃผ๊ธฐ#header .buttons .menu-button { display: block; width: 100%; height: 100%; text-align: center; }
PC๋ฒ์ ์ค๊ณ feat.๋ฏธ๋์ด์ฟผ๋ฆฌ
๋ชจ๋ฐ์ผ ๋ฒ์ ๐
.main-content .product-group-link {
position: relative;
display: block;
width: 100%;
height: 56.25%;
border: solid 10px red;
overflow: hidden;
}
PC ๋ฒ์ ๐
@media (min-width: 60em) {
.main-content .product-group-link {
width: 50%;
height: 28.125%;
}
์ ํ ์์ญ ์ค๊ณ
article
์ฌ์ฉ์
๊ณต๊ฐ์ ํฌ๊ธฐ๋ ์ด๋ฏธ์งํฌ๊ธฐ์ ๊ทผ์ฌ์น๊ฐ์ผ๋ก ๋ฃ์ด์ฃผ๋ฉด๋๋ค.
mainํ๊ทธ์ headerํ๊ทธ์ ๊ฒน์ณ์ง ํ์
ํ๋จ ์์ญ ์ค๊ณ
nav
ํ๊ทธ ์์ ๊ธ์๋ ์
๋ ฅ ๊ฐ๋ฅํ๋ค. <nav class="right-methods">
<h3>Payment Methods</h3>
<ul>
<li><span class="payment-icon one"></span></li>
<li><span class="payment-icon tow"></span></li>
<li><span class="payment-icon three"></span></li>
<li><span class="payment-icon four"></span></li>
<li><span class="payment-icon five"></span></li>
</ul>
</nav>
#footer { position: relative; background-color: yellowgreen; padding-bottom: 66px; }
.to-top-button
๋ถ๋ถ์์ ๋ ์ด์ด ๊ฒน์นจ ํ์์ ์์ ๊ธฐ ์ํด์ !์ถ๊ฐ ์ค๋ฌด ๊ด๋ จ ๋ด์ฉ
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
.ellipsis {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis; }
#header .buttons li .menu-button img { position: relative; height: 20px;
top: 50%; transform: translateY(-50%); }
1) ์คํฌ๋กค์ด ์๋ํ์ง ์์๋ค.
2) main-content ๋ถ๋ถ์ด ์๋ํ์ง ์์๋ค.
1) ํด๊ฒฐ๋ฐฉ๋ฒ
์คํฌ๋กค๊ณผ ๊ด๋ จ๋ ํ๊ทธ๋ overflow
์ธ๋ฐ, css์์ ์์ฑํ overflow
๋ ์ด 2๊ฐ์๋ค.
๊ทธ์ค body
๋ถ๋ถ ์ด๊ธฐํ๊ณผ์ ์์ overflow: hidden;
์ผ๋ก ๋์ด์์๋ค.
์ด ํ๊ทธ๋ก ์ธํด ์คํฌ๋กค์ด ์๋ํ์ง ์์๋ ๊ฒ!
๊ฐ์๋ฅผ ๋ค์๋ณด๋ overflow-x: hidden;
์ผ๋ก ์์ฑํด์ผํ๋ค.
overflow
์ ๋ํด์
2) ํด๊ฒฐ๋ฐฉ๋ฒ
์ ํ์๋ฅผ ์ด๋ค๊ฒ์ ํ๋์ง ๊ผผ๊ผผํ ์ดํด๋ณด๊ธฐ !
class = . / id = #
๊ฐ์ฅ ๋ต๋ตํ๋๊ฑด ๋ชจ๋ฅด๊ณ ์ดํด๊ฐ ๋์ง ์๋ ๋ถ๋ถ์ด ์๊ธฐ๋ฉด ๊ตฌ๊ธ๋งํ๋ฉด ๋๋ถ๋ถ ํด๊ฒฐ๋๊ฑฐ๋, ๋ฉํ ๋์ ๋์์ ๋ฐ์ผ๋ฉด ๋๋ค. ํ์ง๋ง, ์๋ชป ์ ๋ ฅํ ๋ถ๋ถ์ ์ฐพ์๋ด๊ธฐ์ํด์๋ ๊ฐ๋ ์ ์ ํํ๊ฒ ์์์ผ์ง๋ง ๋ฐ๊ฒฌํ ์ ์๋ค๋ ๊ฒ์ ์๊ฒ๋์๋ค. ์์ง์ ์ฃผ๋์ด๋ผ ํ์ต์๊ฐ์ด ์ด์ฉ ์ ์์ด ๊ธธ์ด์ง์ง๋ง, ์ด๊ฒ๋ง ์ฐธ์๋ด๋ฉด ๋๋ ๊ฐ๋ฐ์๊ฐ ๋ ์ ์๊ฒ ์ง...!