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

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

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

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

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

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

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

HTML

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

<body>
<section id="imageType01" class="image__wrap nexon section">
    <h2>๋‹ค์ด์–ด๋ฆฌ ๊พธ๋ฏธ๊ธฐ</h2>
    <p>๋‹น์‹ ๋งŒ์˜ ๋ฉ‹์ง„ ๊ธฐ๋ก์žฅ, ๊ฐœ์„ฑ์žˆ๋Š” ๋‹ค์ด์–ด๋ฆฌ๋ฅผ ๋งŒ๋“ค์–ด๋ณด์„ธ์š”!</p>
    <div class="image__inner container">
        <article class="image img1">
            <h3 class="image__title">๋‹น์‹ ์˜ ๊ธฐ์–ต๋“ค</h3>
            <p class="image__desc">๊ธฐ์–ต์œผ๋กœ ๋‚จ๊ธฐ๋Š” ๊ฒƒ๋„ ์ข‹์€ ๋ฐฉ๋ฒ•์ด์ง€๋งŒ ๊ธฐ๋ก์œผ๋กœ ๋‚จ๊ธฐ์ง€ ์•Š์€ ๊ธฐ์–ต์€ ๊ธˆ๋ฐฉ ํœ˜๋ฐœ๋˜๋Š” ๋ฒ•์ด์ฃ . ๋‹น์‹ ์˜ ๊ธฐ์–ต๊ณผ ๊ฐ์ •์„ ์–ด๋”˜๊ฐ€์— ๋ฐ•์ œํ•˜์„ธ์š”. ํ›—๋‚  ๋‹น์‹ ์˜ ์ถ”์–ต์„ ์ฝ๊ณ  ๊ธฐ๋ปํ•  ๋‹น์‹ ์˜ ์–ผ๊ตด์„ ์ƒ์ƒํ•˜์„ธ์š”!</p>
            <a class="image__btn" href="/" title="์ž์„ธํžˆ ๋ณด๊ธฐ">์ž์„ธํžˆ ๋ณด๊ธฐ</a>
        </article>
        <article class="image img2">
            <h3 class="image__title">๋‹น์‹ ์˜ ์ถ”์–ต์„</h3>
            <p class="image__desc">๋‹น์‹ ์˜ ๊ฐ์ •์„ ์‹œ๊ฐ์ ์œผ๋กœ ํ‘œํ˜„ํ•˜๊ณ  ์‹ถ์ง€ ์•Š์œผ์‹ ๊ฐ€์š”? ์Šคํ‹ฐ์ปค๋ฅผ ๋ถ™์ด์„ธ์š”. ๊ทธ๋ฆผ์„ ๊ทธ๋ฆฌ์„ธ์š”. ๋‹น์‹ ์˜ ์ถ”์–ต์„ ์žฅ์‹ํ•˜์„ธ์š”. ์ ์ ˆํ•œ ์žฅ์‹์€ ๊ฐ์ •์„ ์‹ค๊ฐ๋‚˜๊ฒŒ
                ํ‘œํ˜„ํ•ด์ค๋‹ˆ๋‹ค. ๋งˆ์Œ์— ๋“œ๋Š” ์Šคํ‹ฐ์ปค๋‚˜ ๊ทธ๋ฆผ์œผ๋กœ ์˜ˆ์˜๊ฒŒ ์žฅ์‹ํ•ด๋ณด์„ธ์š”</p>
            <a class="image__btn yellow" href="/" title="์ž์„ธํžˆ ๋ณด๊ธฐ">์ž์„ธํžˆ ๋ณด๊ธฐ</a>
        </article>
    </div>
</section>
</body>

CSS

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

/* fonts */
@import url('https://webfontworld.github.io/NexonLv1Gothic/NexonLv1Gothic.css');
.nexon {
    font-family: 'NexonLv1Gothic';
    font-weight: 400;
}
/* 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: 49%;
    height: 370px;
    color: #fff;
    padding: 200px 30px 30px 30px;
    box-sizing: border-box;
}
.image.img1 {
    background: url(img/image_bg01_01.jpg) no-repeat center;
}
.image.img2 {
    background: url(img/image_bg01_02.jpg) no-repeat center;
}
.image__title {
    font-size: 32px;
    margin-bottom: 10px;
}
.image__desc {
    font-size: 16px;
    font-weight: 300;
    margin-bottom: 10px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.image__btn {
    font-size: 16px;
    color: #fff;
    background-color: #B45A30;
    padding: 10px 20px;
    display: inline-block;
}
.image__btn.yellow {
    background-color: #B59140;
}
728x90
๋ฐ˜์‘ํ˜•

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

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

๋Œ“๊ธ€