λ³Έλ¬Έ λ°”λ‘œκ°€κΈ°
CSS/Layout_Site

ν…μŠ€νŠΈ μœ ν˜• (1)

by oranssy 2022. 9. 1.
728x90
λ°˜μ‘ν˜•

⭐️ ν…μŠ€νŠΈ μœ ν˜• 01 ⭐️


01. λ ˆμ΄μ•„μ›ƒ κ΅¬μƒν•˜κΈ°

λ ˆμ΄μ•„μ›ƒμ„ ꡬ상할 λ•ŒλŠ”, μŠ€μΌ€μΉ˜ν•˜λ©΄μ„œ μ„ΈλΆ€ λ‚΄μš©μ˜ μ •λ³΄κΉŒμ§€ ꡬ체적으둜 κ³„νšν•©λ‹ˆλ‹€.

02. μƒμž(div) λ§Œλ“€κΈ° : <body>

<section id="textType 01" class="text__wrap nexon section">
<h2>ν…μŠ€νŠΈ μœ ν˜• 01</h2>
<p>μŒμ•… ν”Œλ ˆμ΄μ–΄ μ•„μ΄μ½˜ μ„€λͺ…μ„œ</p>
<div class="text__inner container">
<article class="text">
<figure class="text__header">
<img src="img/text_bg01_icon01.png" alt="라이브러리 μ•„μ΄μ½˜">
</figure>
<div class="text__box">
<h3 class="tit">라이브러리</h3>
<p class="desc">
μ•„μ΄μ½˜μ„ λˆ„λ₯΄λ©΄ 화면이 λ°”λ€λ‹ˆλ‹€. 바뀐 ν™”λ©΄μ—μ„œ μ›ν•˜λŠ” λ©”λ‰΄λ‘œ 이동/ 섀정을 μ™„λ£Œν•˜μ‹­μ‹œμ˜€. μ•„μ΄μ½˜μ„ 길게 λˆ„λ₯΄λ©΄ μ„€λͺ… μƒμžκ°€ λ‚˜μ˜΅λ‹ˆλ‹€.
</p>
<a href="#">더보기</a>
</div>
</article>
<article class="text">
<figure class="text__header">
<img src="img/text_bg01_icon02.png" alt="앨범 μ•„μ΄μ½˜">
</figure>
<div class="text__box">
<h3 class="tit">앨범</h3>
<p class="desc">
μ•„μ΄μ½˜μ„ λˆ„λ₯΄λ©΄ 화면이 λ°”λ€λ‹ˆλ‹€. 바뀐 ν™”λ©΄μ—μ„œ μ›ν•˜λŠ” λ©”λ‰΄λ‘œ 이동/ 섀정을 μ™„λ£Œν•˜μ‹­μ‹œμ˜€. μ•„μ΄μ½˜μ„ 길게 λˆ„λ₯΄λ©΄ μ„€λͺ… μƒμžκ°€ λ‚˜μ˜΅λ‹ˆλ‹€.
</p>
<a href="#">더보기</a>
</div>
</article>
<article class="text">
<figure class="text__header">
<img src="img/text_bg01_icon03.png" alt="μ•„ν‹°μŠ€νŠΈ μ•„μ΄μ½˜">
</figure>
<div class="text__box">
<h3 class="tit">μ•„ν‹°μŠ€νŠΈ</h3>
<p class="desc">
μ•„μ΄μ½˜μ„ λˆ„λ₯΄λ©΄ 화면이 λ°”λ€λ‹ˆλ‹€. 바뀐 ν™”λ©΄μ—μ„œ μ›ν•˜λŠ” λ©”λ‰΄λ‘œ 이동/ 섀정을 μ™„λ£Œν•˜μ‹­μ‹œμ˜€. μ•„μ΄μ½˜μ„ 길게 λˆ„λ₯΄λ©΄ μ„€λͺ… μƒμžκ°€ λ‚˜μ˜΅λ‹ˆλ‹€.
</p>
<a href="#">더보기</a>
</div>
</article>
<article class="text">
<figure class="text__header">
<img src="img/text_bg01_icon04.png" alt="반볡 λ“£κΈ° μ•„μ΄μ½˜">
</figure>
<div class="text__box">
<h3 class="tit">반볡 λ“£κΈ°</h3>
<p class="desc">
μ•„μ΄μ½˜μ„ λˆ„λ₯΄λ©΄ 화면이 λ°”λ€λ‹ˆλ‹€. 바뀐 ν™”λ©΄μ—μ„œ μ›ν•˜λŠ” λ©”λ‰΄λ‘œ 이동/ 섀정을 μ™„λ£Œν•˜μ‹­μ‹œμ˜€. μ•„μ΄μ½˜μ„ 길게 λˆ„λ₯΄λ©΄ μ„€λͺ… μƒμžκ°€ λ‚˜μ˜΅λ‹ˆλ‹€.
</p>
<a href="#">더보기</a>
</div>
</article>
<article class="text">
<figure class="text__header">
<img src="img/text_bg01_icon05.png" alt="μ„žμ–΄ λ“£κΈ° μ•„μ΄μ½˜">
</figure>
<div class="text__box">
<h3 class="tit">μ„žμ–΄ λ“£κΈ°</h3>
<p class="desc">
μ•„μ΄μ½˜μ„ λˆ„λ₯΄λ©΄ 화면이 λ°”λ€λ‹ˆλ‹€. 바뀐 ν™”λ©΄μ—μ„œ μ›ν•˜λŠ” λ©”λ‰΄λ‘œ 이동/ 섀정을 μ™„λ£Œν•˜μ‹­μ‹œμ˜€. μ•„μ΄μ½˜μ„ 길게 λˆ„λ₯΄λ©΄ μ„€λͺ… μƒμžκ°€ λ‚˜μ˜΅λ‹ˆλ‹€.
</p>
<a href="#">더보기</a>
</div>
</article>
<article class="text">
<figure class="text__header">
<img src="img/text_bg01_icon06.png" alt="μ˜΅μ…˜ 선택 μ•„μ΄μ½˜">
</figure>
<div class="text__box">
<h3 class="tit">μ˜΅μ…˜ 선택</h3>
<p class="desc">
μ•„μ΄μ½˜μ„ λˆ„λ₯΄λ©΄ 화면이 λ°”λ€λ‹ˆλ‹€. 바뀐 ν™”λ©΄μ—μ„œ μ›ν•˜λŠ” λ©”λ‰΄λ‘œ 이동/ 섀정을 μ™„λ£Œν•˜μ‹­μ‹œμ˜€. μ•„μ΄μ½˜μ„ 길게 λˆ„λ₯΄λ©΄ μ„€λͺ… μƒμžκ°€ λ‚˜μ˜΅λ‹ˆλ‹€.
</p>
<a href="#">더보기</a>
</div>
</article>
</div>
</section>

02. style(css) μ„€μ •ν•˜κΈ° : <style>

/* fonts */
@import url('https://webfontworld.github.io/gmarket/GmarketSans.css');
.gmarket {
font-family: 'GmarketSans'; /* 폰트 지정 */
font-weight: 300; /* 폰트 λ‘κ»˜ μ„€μ • */
}
/* reset */
* {
margin: 0; /* κΈ°λ³Έ λΈŒλΌμš°μ €μ˜ 빈 곡간 μ—†μ• κΈ° */
padding: 0;
}
body {
background-color: #FDF3EF;
}
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; /* κ°€μš΄λ° μ •λ ¬ */
min-width: 1160;
}
.section {
padding: 120px 0;
}
.section > h2 { /* > λ°”λ‘œ 밑에 μžˆλŠ” μžμ‹μ„ 선택 */
font-size: 50px;
line-height: 1; /* 쀄간격 μ„€μ • */
text-align: center; /* κΈ€μž 쀑앙 μ •λ ¬ */
margin-bottom: 20px;
}
.section > p {
font-size: 20px;
font-weight: 500;
color: #666;
text-align: center;
margin-bottom: 70px;
}
/* textType 03 */
.text__inner {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.text__box {
background-color: #fff;
width: 32%;
padding: 30px;
box-sizing: border-box;
border-radius: 10px;
}
.text__box:hover {
background-color: #fff8cd;
}
.text__box .desc {
font-size: 18px;
color: #555;
line-height: 1.2;
padding-bottom: 20px;
border-bottom: 1px dashed #d9d9d9;
box-sizing: border-box;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 9; /* clamp μ€„λ°”κΏˆ 9쀄 이상 되면 ... 으둜 λ°”λ€œ - κ²€μƒ‰ν•΄μ„œ μ‚¬μš© */
-webkit-box-orient: vertical;
}
.text__info {
margin-top: 20px;
display: flex;
padding-bottom: 20px;
box-sizing: border-box;
margin-bottom: 20px;
border-bottom: 1px dashed #d9d9d9;
}
.text__info img{
width: 60px;
padding: 0 10px 0 0;
}
.text__info .user {
display: inline;
}
.text__info .user h3 {
font-size: 22px;
padding: 0 0 0 5px;
}
.text__info .user h3 > span {
font-size: 14px;
color: #666;
}
.text__info .user h4 {
font-size: 22px;
}
.text__box .more {
width: 120px;
height: 26px;
background-color: #FF753D;
border-radius: 50px;
text-align: center;
line-height: 26px;
}
.text__box .more a {
font-size: 14px;
font-weight: 500;
color: #fff;
}

03. 결과보기

728x90
λ°˜μ‘ν˜•

'CSS > Layout_Site' μΉ΄ν…Œκ³ λ¦¬μ˜ λ‹€λ₯Έ κΈ€

ν…μŠ€νŠΈ μœ ν˜• (3)  (2) 2022.09.01
ν…μŠ€νŠΈ μœ ν˜• (2)  (2) 2022.09.01
이미지 μœ ν˜• (3)  (2) 2022.08.22
이미지 μœ ν˜• (2)  (2) 2022.08.18
이미지 μœ ν˜• (1)  (4) 2022.08.17

λŒ“κΈ€