728x90
๋ฐ์ํ
์ด๋ฏธ์ง ์ ํ 03
์ด๋ฏธ์ง ์ ํ ๋ ์ด์์ ์ฌ์ดํธ์ ๋๋ค. ์ด๋ฒ ์ฌ์ดํธ๋ flex๋ก ์์ ํ๋ ์ฌ์ดํธ์๋ ๋ค๋ฅด๊ฒ grid๋ฅผ ์ฌ์ฉํ์์ต๋๋ค.
๋ ์ด์์ ์ค์
figma๋ก ๊ทธ๋ฆฌ๋์ ์ฌ์ดํธ์ ๋ ์ด์์์ ์ก์ต๋๋ค.
HTML
html ์์ค์ ๋๋ค.
<body>
<section id="imageType03" class="image__wrap gowun section">
<h2>๊ท์ฝ๊ณ ๋ฉ์ง ๋๋ฌผ๋ค</h2>
<p>
๋๋ฌผ์ ์ฌ๋ํฉ์๋ค. ์ ๋ ๋๋ฌผ์ ์ ๋ง ์ฌ๋ํฉ๋๋ค.<br>
๊ท์ฝ๊ณ ๋ฉ์ง ๋๋ฌผ๋ค์ ๋ง๋๋ณด์ธ์. ์์ฐ์ ๊ฒฝ์ด๋ก์์ ๊ฐํํ๊ฒ ๋ ๊ฒ์
๋๋ค.
</p>
<div class="image__inner container-fluid">
<article class="image">
<!-- <figure class="image__box">
<img src="img/image_bg03_01.jpg" alt="์
ฐ์ดํฌ ๋กํธํด๋ผ ๋ชจ์คํฌ">
</figure> -->
<div class="image__desc">
<h3>๊ท์ฌ์ด ์ต๋ฌด์</h3>
<p>์ฌ์ฝ๋ด์ด๋ ์ ๋ง ๊ท์ฝ์ต๋๋ค. ํธ๊ธฐ์ฌ์ด ๋ง๊ณ ์ฌ๋์ ์ข์ํ๋ ์ข
์ด๊ธฐ์ ๋ง์ ์ฌ๋๋ค์ ๋ฐ๋ ค ์ต๋ฌด๋ก ๊ธธ๋ฌ์ง๊ณ ์์ต๋๋ค. ๋๋ฌด ๊ท์ฌ์์ ์งฑ</p>
</div>
<div class="image__sns">
<a href="#" class="link"><span class="ir">ํ์ด์ค๋ถ</span></a>
<a href="#" class="link"><span class="ir">ํ์ด์ง์ด๋</span></a>
<a href="#" class="link"><span class="ir">ํ์ด์ง์ด๋</span></a>
<a href="#" class="link"><span class="ir">ํ์ด์ง์ด๋</span></a>
<a href="#" class="link"><span class="ir">ํ์ด์ง์ด๋</span></a>
</div>
</article>
<article class="image">
<figure class="image__box">
<img src="img/image_bg03_02.jpg" alt="๊ท์ฌ์ด ์ฌ์ฐ">
</figure>
<div class="image__desc">
<h3>๊ท์ฌ์ด ์ฌ์ฐ</h3>
<p>์ฌ์ฐ๋ ์ ๋ง ๊ท์ฝ์ต๋๋ค. ๋๋ฌด ๊ท์ฌ์์ ๋๋ฌผ์ด ๋์. ์ฌ์ฐ ์ ํ๋ฒ๊ฐ ์๋ค๋ ๊ฑธ ์์๋์? ๊ทธ๊ฑฐ ๋ณด์๋ฉด ์ง์ง ๋๋ฌด ๊ท์ฌ์์ ๋๋ฌผ์ด ๋์ฌ๊ฒ๋๋ค.</p>
</div>
<div class="image__sns">
<a href="#" class="link"><span class="ir">ํ์ด์ค๋ถ</span></a>
<a href="#" class="link"><span class="ir">ํ์ด์ง์ด๋</span></a>
</div>
</article>
<article class="image">
<figure class="image__box">
<img src="img/image_bg03_03.jpg" alt="๋ฉ์ง ๋๋">
</figure>
<div class="image__desc">
<h3>๋ฉ์ง ๋๋</h3>
<p>ํ์ ๋๋๋ ์ ๋ง ๋ฉ์ง์ฃ ๊ฐ์ ์กฐ์์ด๋ผ๊ณ ๋ถ๋ฆฌ๋ ๋๋ ๊ทธ๋์ ๊ทธ๋ฐ์ง ๋ฉ์ง๊ณ ๋ฌด์ญ๊ธด ํ์ง๋ง ๊ทธ๋งํผ ๊ท์ฌ์๋ณด์ด๊ธฐ๋ ํ๋ค์</p>
</div>
<div class="image__sns">
<a href="#" class="link"><span class="ir">ํ์ด์ค๋ถ</span></a>
<a href="#" class="link"><span class="ir">ํ์ด์ง์ด๋</span></a>
</div>
</article>
<article class="image">
<figure class="image__box">
<img src="img/image_bg03_04.jpg" alt="๊ท์ฌ์ด ์ฌ์ด">
</figure>
<div class="image__desc">
<h3>๊ท์ฌ์ด ์ฌ์ด</h3>
<p>์ฌ์ด์จ๋ ์ ๋ง ๊ท์ฌ์์ ์๋ก, ๊ณ ๋ผ๋ ๋ฑ๋ฑ... ๋ค๋ฅธ๊ฑด ์ ๋ชจ๋ฅด๊ฒ ์ง๋ง ๋น์ทํ๊ฒ ์๊ฒผ์ผ๋ ์น์ฒ๋ป์ด๊ฒ ์ฃ ??</p>
</div>
<div class="image__sns">
<a href="#" class="link"><span class="ir">ํ์ด์ค๋ถ</span></a>
<a href="#" class="link"><span class="ir">ํ์ด์ง์ด๋</span></a>
</div>
</article>
<article class="image">
<figure class="image__box">
<img src="img/image_bg03_05.jpg" alt="๊ท์ฌ์ด ๋ผ์ฟค">
</figure>
<div class="image__desc">
<h3>๊ท์ฌ์ด ๋ผ์ฟค</h3>
<p>๋๊ตด๋งจ์ด๋ผ ๋ถ๋ฆฌ๋ ์ด ์ฌ์ง์ ์ฃผ์ธ๊ณต์ ์ฌ์ค ๋ผ์ฟค์ด์๋ต๋๋ค! ํ์ง๋ง ๋ ๋ค ๊ท์ฝ๊ณ ๋ ๋ค ๋น์ทํ๊ฒ ์๊ฒผ์ผ๋ ๋ญ ์๊ด ์์ง ์์๊น์</p>
</div>
<div class="image__sns">
<a href="#" class="link"><span class="ir">ํ์ด์ค๋ถ</span></a>
<a href="#" class="link"><span class="ir">ํ์ด์ง์ด๋</span></a>
</div>
</article>
</div>
</section>
</body>
CSS
css ์์ค์ ๋๋ค. figma๋ก ์ค์ ํด๋์ ๋ ์ด์์์ด๋ zaplin์ ๋ณด๋ฉฐ ์ ์ ํ๊ฒ css๋ฅผ ์ค์ ํด์ค๋๋ค.
/* fonts */
@import url('https://webfontworld.github.io/gmarket/GmarketSans.css');
.gowun {
font-family: GowunBatang;
font-weight: 400;
}
/* reset */
* {
margin: 0;
padding: 0;
}
a {
text-decoration: none;
color: #000;
}
img {
width: 100%;
vertical-align: top;
border-radius: 10px;
}
h1, h2, h3, h4, h5, h6 {
font-weight: normal;
}
.ir {
display: block;
overflow: hidden;
font-size: 0;
line-height: 0;
text-indent: -9999px;
}
/* common */
.container {
width: 1160px;
padding: 0 20px;
margin: 0 auto;
min-width: 1160px;
}
.container-fluid {
width: 100%;
padding: 0 100px;
box-sizing: border-box;
}
.section {
padding: 120px 0;
}
.section > h2 {
font-size: 50px;
line-height: 1;
text-align: center;
margin-bottom: 20px;
}
.section > p {
font-size: 22px;
font-weight: 300;
color: #666;
text-align: center;
margin-bottom: 70px;
}
/* imageType */
.image__inner {
display: grid;
grid-template-areas:
"box1 box1 box2 box3"
"box1 box1 box4 box5";
grid-template-columns: 1fr 1fr 1fr 1fr;
grid-template-rows: 1fr 1fr;
grid-gap: 20px;
}
.image {
position: relative;
overflow: hidden;
}
.image__inner .image:nth-child(1) {
grid-area: box1;
background: url(img/image_bg03_01.jpg);
background-size: cover;
border-radius: 10px;
}
.image__inner .image:nth-child(2) {
grid-area: box2;
}
.image__inner .image:nth-child(3) {
grid-area: box3;
}
.image__inner .image:nth-child(4) {
grid-area: box4;
}
.image__inner .image:nth-child(5) {
grid-area: box5;
}
.image__desc {
position: absolute;
left: 0;
bottom: -100%;
width: 100%;
background-color: rgba(255, 255, 255, 0.3);
backdrop-filter: blur(20px);
padding: 16px;
box-sizing: border-box;
transition: all 0.3s ease;
border-radius: 0 0 10px 10px ;
}
.image:hover .image__desc{
bottom: 0;
}
.image__desc h3 {
font-size: 20px;
}
.image__desc p {
font-size: 16px;
color: 666;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.image__sns {
position: absolute;
right: 10px;
opacity: 0;
top: 10px;
transition: all 0.5s ease;
}
.image__sns a {
width: 36px;
height: 36px;
background-color: #fff;
border-radius: 50%;
display: block;
margin-bottom: 5px;
background: url(img/image_bg_03_icon.svg) no-repeat;
}
.image__sns a:nth-child(1){}
.image__sns a:nth-child(2){
background-position: -50px 0;
}
.image__sns a:nth-child(3){
background-position: -100px 0;
}
.image__sns a:nth-child(4){
background-position: -150px 0;
}
.image__sns a:nth-child(5){
background-position: -200px 0;
}
.image:hover .image__sns {
/* right: 10px; */
opacity: 1;
}
728x90
๋ฐ์ํ
'Site ์ ์' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
03. ํ ์คํธ ์ ํ - 2 (2) | 2022.08.31 |
---|---|
03. ํ ์คํธ ์ ํ 01 (4) | 2022.08.30 |
02. ์ด๋ฏธ์ง ์ ํ - 2 (3) | 2022.08.18 |
02. ์ด๋ฏธ์ง ์ ํ - 1 (3) | 2022.08.18 |
03. ์นด๋ ์ ํ - 3 (11) | 2022.08.11 |
๋๊ธ