728x90
๋ฐ์ํ
โญ๏ธ ํ ์คํธ ์ ํ 03 โญ๏ธ
01. ๋ ์ด์์ ๊ตฌ์ํ๊ธฐ
๋ ์ด์์์ ๊ตฌ์ํ ๋๋, ์ค์ผ์นํ๋ฉด์ ์ธ๋ถ ๋ด์ฉ์ ์ ๋ณด๊น์ง ๊ตฌ์ฒด์ ์ผ๋ก ๊ณํํฉ๋๋ค.
02. ์์(div) ๋ง๋ค๊ธฐ : <body>
<section id="textType 03" class="text__wrap gmarket section">
<h2>์ฌ์ฉ ํ๊ธฐ</h2>
<p>๋ฐ๋์์๋ฅผ ์ฌ์ฉํ์ ๋ถ๋ค์ ํ๊ธฐ๋ฅผ ์ฐธ๊ณ ํด๋ณด์ธ์!</p>
<div class="text__inner container">
<article class="text__box">
<p class="desc">
์ํ ํผ๊ฐ ์ฌํ ํผ๋ถ๋ผ, ๋ ๋ง์ ๊ฒ์ ๋ฐ์ ธ๋ณด๋ฉฐ ๊ตฌ๋งคํ๋๋ฐ์. ์ ํ์ด ์ฒ์ฐ ์ฑ๋ถ์ด๋ผ๋ ๊ฒ๊ณผ, ์๊ทน์ด ๊ฑฐ์ ์๋ค๋ ๋ฆฌ๋ทฐ ๋ณด๊ณ ๊ตฌ๋งคํด๋ดค์ด์. <br>
์ ํ์ ์์ฒญ ๋ฌผ ๊ฐ์ด ๋ฌฝ๊ณ , ์ธ์์ ์ด์ง ์์ ํฅ์ ์ ์๊ทน ๋ง์ต๋๋ค..! <br>
ํฐ ๊ธฐ๋ํ์ง ์๊ณ ๊ตฌ๋งคํ๋๋ฐ ์๋นํ ๋ง์กฑ์ค๋ฌ์์ ^*^ <br>
๋ค๋ง ํ์ ์ฌ์ฉํ์ง ์๊ณ ์์ผ๋ก ๋ฌธ์ง๋ฅด
<div class="text__info">
<img src="img/text_bg03_icon01.png" alt="์๋ ์ผ๊ตด ์์ด์ฝ">
<div class="user">
<h3>sumi*** <span>22.08.31</span></h3>
<h4>โญ๏ธโญ๏ธโญ๏ธโญ๏ธโ</h4>
</div>
</div>
<div class="more">
<a href="#">์์ธํ ๋ณด๊ธฐ</a>
</div>
</article>
<article class="text__box">
<p class="desc">
์ธ์์ ์ ๋ฐ๋์ ํ์ ๋ ์ํ ์ ํ์ผ๋ก ๋ฐ๊ฟ์ผ๊ฒ ๋ค ํ๋ฉด์ ์ฐพ์๋ณด๋ค๊ฐ ๋ฐ๊ฒฌํ์ด์. <br>
์ฃผ๋ฌธํ ์ดํธ๊ฐ ์์ง ์ ์์ - ์ฌ์ธ์์ด๋ผ๊ธธ๋ ๋จธ๋ฆฌ ๊ฐ์๋ดค๋๋ฐ, ์ดํธ๋ง ํ์ ๋๋ ๋ปฃ๋ปฃํด์ ํธ๋ฆฌํธ๋จผํธ๋ ๊ผญ ํจ๊ป ์ฌ์ฉํด์ผ ํ ๋ฏ ํ๋ค์. <br>
์ ๋ ์ธ์๊ณผ ๋ฐ๋ ์ ์ฉ์ผ๋ก ์ฌ์ฉํ ๊ฑฐ๋ผ์ ๋ง์กฑํฉ๋๋ค. ๊ฐ์ธ์ ์ผ๋ก ๋ฏธ๋๊ฑฐ๋ฆผ์ด
</p>
<div class="text__info">
<img src="img/text_bg03_icon02.png" alt="์๋ ์ผ๊ตด ์์ด์ฝ">
<div class="user">
<h3>arra*** <span>22.08.28</span></h3>
<h4>โญ๏ธโญ๏ธโญ๏ธโญ๏ธโ</h4>
</div>
</div>
<div class="more">
<a href="#">์์ธํ ๋ณด๊ธฐ</a>
</div>
</article>
<article class="text__box">
<p class="desc">
์ฌ๊ธฐ ์ ์ฐฉ์ด์!! ๋์๋ณด๋ ๋ฒ์จ 5ํต์ด๋ ์ฌ์ฉํ๋ต๋๋ค. <br>
์์ผ์ค ์ ํ ์ฌ์ฉํด๋ณด๊ณ ๋๋ฌด ์ํ๊ณ ์ข์์ ๋ฐ๋๋ ๊ฒฝํํด๋ดค๋๋ฐ, ์ด๋์ ์ด๋ ๊ฒ ๋น ํต์ด ๋์๋ค์. ใ
ใ
<br>
์ ๋ช
ํ ๋ฐ๋ ์ ํ ๋ค์ํ๊ฒ ์ฌ์ฉํด๋ดค๋๋ฐ ์ ํผ๋ถ์๋ ์ด ์ ํ์ด ๋ฑ์
๋๋ค. <br>
์ธ์ ๋ฐ๋์์ ์ฐพ์์ด์. ์์ผ๋ก๋ ๊ณ์ ๋ง๋ค์ด์ฃผ์
์ผ ํด์ ใ
ใ
โก ๊ผญ์ด์!!
</p>
<div class="text__info">
<img src="img/text_bg03_icon03.png" alt="์๋ ์ผ๊ตด ์์ด์ฝ">
<div class="user">
<h3>chip*** <span>22.08.25</span></h3>
<h4>โญ๏ธโญ๏ธโญ๏ธโญ๏ธโญ๏ธ</h4>
</div>
</div>
<div class="more">
<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;
margin-left: 96px;
}
.text__box .more a {
font-size: 14px;
font-weight: 500;
color: #fff;
}
03. ๊ฒฐ๊ณผ๋ณด๊ธฐ
728x90
๋ฐ์ํ
'CSS > Layout_Site' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
ํค๋ ์ ํ (1) (2) | 2022.09.02 |
---|---|
์ด๋ฏธ์ง ํ ์คํธ ์ ํ (1) (3) | 2022.09.02 |
ํ ์คํธ ์ ํ (2) (2) | 2022.09.01 |
ํ ์คํธ ์ ํ (1) (2) | 2022.09.01 |
์ด๋ฏธ์ง ์ ํ (3) (2) | 2022.08.22 |
๋๊ธ