๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
Site ์ œ์ž‘

02. ์ด๋ฏธ์ง€ ์œ ํ˜• - 2

by Youcodein 2022. 8. 18.
728x90
๋ฐ˜์‘ํ˜•

์ด๋ฏธ์ง€ ์œ ํ˜• 2

์ด๋ฏธ์ง€ ์œ ํ˜• ๋ ˆ์ด์•„์›ƒ ์‚ฌ์ดํŠธ์ž…๋‹ˆ๋‹ค. html๊ณผ css๋กœ ์ž‘์—…ํ•˜์˜€์Šต๋‹ˆ๋‹ค.

๋ ˆ์ด์•„์›ƒ ์„ค์ •

figma๋กœ ๊ทธ๋ฆฌ๋“œ์™€ ์‚ฌ์ดํŠธ์˜ ๋ ˆ์ด์•„์›ƒ์„ ์žก์Šต๋‹ˆ๋‹ค.

HTML

html ์†Œ์Šค์ž…๋‹ˆ๋‹ค.

<body>
<section id="imageType01" class="image__wrap gmark section">
    <h2>BEST ์†Œํ’ˆ์ƒต</h2>
    <p>๋‹ค์–‘ํ•œ ์†Œํ’ˆ์ƒต์„ ๊ฐ€ ๋ณธ ์‚ฌ๋žŒ์ด ๋ฝ‘์€ ์ตœ๊ณ ์˜ ์†Œํ’ˆ์ƒต BEST3</p>
    <div class="image__inner container">
        <article class="image img1">
            <figure> class="image__box">
                <img src="img/image_bg02_01.jpg" alt="">
            </figure>
            <div class="image__desc">
                <h3>๋‚ด๊ฐ€๋งŒ๋“  ๊ธฐ๋ฆฐํ‚ค๋ง</h3>
                <a> href="" class="more" title="์ž์„ธํžˆ๋ณด๊ธฐ">์ž์„ธํžˆ๋ณด๊ธฐ</a>
            </div>
        </article>
        <article class="image img2">
            <figure> class="image__box">
                <img src="img/image_bg02_02.jpg" alt="">
            </figure>
            <div class="image__desc">
                <h3>์ž๊ทธ๋งˆํ•œ ์ธํ…Œ๋ฆฌ์–ด๋ฐฉ</h3>
                <a> href="" class="more" title="์ž์„ธํžˆ๋ณด๊ธฐ">์ž์„ธํžˆ๋ณด๊ธฐ</a>
            </div>
        </article>
        <article class="image img3">
            <figure> class="image__box">
                <img src="img/image_bg02_03.jpg" alt="">
            </figure>
            <div class="image__desc">
                <h3>์˜ค๋Š˜์˜ ๊ฐ์„ฑ</h3>
                <a> href="" class="more" title="์ž์„ธํžˆ๋ณด๊ธฐ">์ž์„ธํžˆ๋ณด๊ธฐ</a>
            </div>
        </article>
    </div>
</section>
</body>

CSS

css ์†Œ์Šค์ž…๋‹ˆ๋‹ค. figma๋กœ ์„ค์ •ํ•ด๋†“์€ ๋ ˆ์ด์•„์›ƒ์ด๋‚˜ zaplin์„ ๋ณด๋ฉฐ ์ ์ ˆํ•˜๊ฒŒ css๋ฅผ ์„ค์ •ํ•ด์ค๋‹ˆ๋‹ค.

/* fonts */
@import url('https://webfontworld.github.io/gmarket/GmarketSans.css');

.gmark {
    font-family: 'GmarketSans';
    font-weight: 500;
}

/* reset */
* {
    margin: 0;
    padding: 0;
}

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: 1160px;
}

.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: flex;
    justify-content: space-between;
}

.image {
    width: 32%;
    background-color: #ccc;
    position: relative;
    overflow: hidden;
}




.image__box {}

.image__box img {
    vertical-align: top;

    transition: all 0.6s ease-in-out
}

.image__desc {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    padding: 23px 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    box-sizing: border-box;
    background-color: rgba(0,0,0,0.1);
    bottom: -100px;
    transition: all 0.3s ease-in-out
}
.image:hover .image__desc{
    bottom: 0;
}
.image:hover .image__box img {
    transform: scale(1.03);
}

.img1 .image__desc{
    background-color: rgba(0,0,0,0.1);
}
.img2 .image__desc{
    background-color: rgba(0,0,0,0.2);
}
.img3 .image__desc{
    background-color: rgba(0,0,0,0.3);
}

.img1 .image__desc h3 {
    color: #fff;
}
.img1 .image__desc .more {
    color: #fff;
}

.img2 .image__desc h3 {
    color: #fff;
}
.img2 .image__desc .more {
    color: #fff;
}

.img3 .image__desc h3 {
    color: #fff;
}
.img3 .image__desc .more {
    color: #fff;
}

.image__desc h3 {
    font-size: 24px;
    margin-bottom: 5px;

}

.image__desc .more {
    font-size: 16px;

}
.image__desc .more:hover {
    text-decoration: underline;
}
728x90
๋ฐ˜์‘ํ˜•

'Site ์ œ์ž‘' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

03. ํ…์ŠคํŠธ ์œ ํ˜• 01  (4) 2022.08.30
02. ์ด๋ฏธ์ง€ ์œ ํ˜• - 3  (4) 2022.08.21
02. ์ด๋ฏธ์ง€ ์œ ํ˜• - 1  (3) 2022.08.18
03. ์นด๋“œ ์œ ํ˜• - 3  (11) 2022.08.11
02. ์นด๋“œ ์œ ํ˜•-2  (7) 2022.08.10

๋Œ“๊ธ€