๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
WebSite

์›น์‚ฌ์ดํŠธ ๋งŒ๋“ค๊ธฐ : ํ…์ŠคํŠธ ์œ ํ˜• ๋ ˆ์ด์•„์›ƒ03

by ์ฝ”ํŒŒ์นด 2022. 9. 1.
728x90

๋ ˆ์ด์•„์›ƒ : ํ…์ŠคํŠธ ์œ ํ˜•03

๋‹ค์Œ๊ณผ ๊ฐ™์€ ํ…์ŠคํŠธ ์œ ํ˜•์˜ ๋ ˆ์ด์•„์›ƒ์„ ์ž‘์—…ํ•ด ๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

HTML ์†Œ์Šค

๋จผ์ €, ์ปจํ…Œ์ด๋„ˆ ๋ฐ•์Šค ์•ˆ์— ์ œ๋ชฉ์„ ์ ์–ด ์ฃผ๊ณ , ์นด๋“œ ๋ถ€๋ถ„์€ contents ๋ฐ•์Šค๋ฅผ ๋งŒ๋“ค์–ด, contents ๋ฐ•์Šค ์•ˆ์— ์„ธ ๊ฐœ์˜ card๋ฅผ ๋งŒ๋“ค์–ด ์ฃผ์—ˆ์Šต๋‹ˆ๋‹ค. ๊ฐ๊ฐ์˜ ์นด๋“œ๋Š” ๋‚ด์šฉ ๋ถ€๋ถ„๊ณผ info ๋ถ€๋ถ„, ๋งํฌ ๋ถ€๋ถ„์œผ๋กœ ๋‚˜๋ˆ„์–ด ์ฃผ์—ˆ์Šต๋‹ˆ๋‹ค. info ๋ฐ•์Šค๋Š” icon๊ณผ ์ •๋ณด ๋ถ€๋ถ„์œผ๋กœ ๋‚˜๋ˆ„์–ด ์ฃผ์—ˆ์Šต๋‹ˆ๋‹ค.

<section id="textType03" class="container section nanum">
    <h2>์Šคํ„ฐ๋”” ํ›„๊ธฐ</h2>
    <p>์›น๋””์ž์ด๋„ˆ, ์›น ํผ๋ธ”๋ฆฌ์…”, ํ”„๋ก ํŠธ์•ค๋“œ ๊ฐœ๋ฐœ์ž ๋ฉค๋ฒ„๋ฅผ ์†Œ๊ฐœํ•ฉ๋‹ˆ๋‹ค.</p>
    <div class="contents">
        <article class="card">
            <p class="card__desc">๋ถˆ๊ณผ 3๋‹ฌ ์ „๋งŒ ํ•ด๋„ ์—ฌ๋Ÿฌ ์›์ธ๋“ค๋กœ ์ธํ•ด ์ž์กด๊ฐ์ด ๋ฐ‘๋ฐ”๋‹ฅ์ด์—ˆ๋˜ ์ €์—๊ฒŒ ์ด ์Šคํ„ฐ๋””๋Š” ๋„ˆ๋ฌด ์†Œ์ค‘ํ•œ ์‹œ๊ฐ„์ด์—ˆ์–ด์š”. ๋งค์ผ ๋งˆ์Œ ์†์œผ๋กœ ์šธ๊ณ  ์‹ถ๋‹ค๋ฅผ ์™ธ์ณค๋˜ ์ €์˜€๋Š”๋ฐ ์ด์ œ๋Š” ์กฐ๊ธˆ์ด๋‚˜๋งˆ ์ด๊ฒจ๋‚ผ ์ˆ˜ ์žˆ์„ ๊ฒƒ ๊ฐ™๋„ค์š”. ๋‹ค์Œ์— ์„ ์ƒ๋‹˜์„ ๋งŒ๋‚ฌ์„ ๋•Œ๋Š” ๋งŽ์ด ๋ฐœ์ „ํ•ด์žˆ๋Š” ์ œ๊ฐ€ ๋˜์—ˆ์œผ๋ฉด ์ข‹๊ฒ ์–ด์š”.</p>
            <div class="card__info">
                <div class="icon__box">
                    <div class="card__icon"></div>
                </div>
                <div class="info__box">
                    <span class="info__name">์ดํƒœ์šฉ</span>
                    <span class="info__number">์›น์Šค 24๊ธฐ</span>
                    <span class="info__star ir">๋ณ„์ด ๋‹ค์„ฏ ๊ฐœ</span>
                </div>
            </div>
            <a href="#"><span class="more">์ž์„ธํžˆ ๋ณด๊ธฐ</span></a>
        </article>
        <article class="card">
            <p class="card__desc">์ง„์‹ฌ ํ•™๊ต๋‚˜ ํ•™์›๋ณด๋‹ค ๋” ๋งŽ์ด ๋ฐฐ์šด ๊ฑฐ๋ผ๊ณ  ์ƒ๊ฐํ•˜๊ณ , ๋ฌด์ง€ํ•˜๊ณ  ๋ง ์•ˆ ๋“ฃ๊ณ  ์ž์กด๊ฐ ๋ฐ”๋‹ฅ์ธ ์ €์—๊ฒŒ ํŒฉํญ๋„ ํ•ด ์ฃผ์‹œ๊ณ , ๋ฒ„๋ฆฌ์ง€ ์•Š์•„ ์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค ์Œค!!!!!!!!!
                ํšŒ์‚ฌ์—์„œ ์ž˜๋ฆฌ์ง€ ์•Š๊ณ ,,, ์กด๋ฒ„ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค!!!!!!!</p>
            <div class="card__info">
                <div class="icon__box">
                    <div class="card__icon"></div>
                </div>
                <div class="info__box">
                    <span class="info__name">์ดํฌ์ง„</span>
                    <span class="info__number">์›น์Šค 24๊ธฐ</span>
                    <span class="info__star ir">๋ณ„์ด ๋„ค ๊ฐœ</span>
                </div>
            </div>
            <a href="#"><span class="more">์ž์„ธํžˆ ๋ณด๊ธฐ</span></a>
        </article>
        <article class="card">
            <p class="card__desc">์ œ๊ฐ€ ๊ฒŒ์„๋Ÿฌ์„œ ์˜๋„์น˜ ์•Š๊ฒŒ ์ž๊พธ ๋ง์„ ์•ˆ๋“ฃ๋Š” ํ•™์ƒ์ด ๋˜์—ˆ์—ˆ์ง€๋งŒ ์ •๋ง ์„ ์ƒ๋‹˜ ๋ง์”€ ํ‹€๋ฆฐ ๊ฒƒ ํ•˜๋‚˜๋„ ์—†์—ˆ๋‹ค๋Š” ๊ฑฐ ์ž˜ ์•Œ๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค,,, ใ…Žใ…Ž
                ์•„ ๊ทธ๋ฆฌ๊ณ  ๋งˆ์ง€๋ง‰ ํ•˜๊ณ  ์‹ถ์€ ๋ง์€ ์ € ์ƒˆ๋ฒฝ 5~6์‹œ์— ์ž๋Š” ใ„นใ…‡์˜ฌ๋นผ๋ฏธํ˜• ์ธ๊ฐ„์ธ๋ฐ... ์Œค์ด๋ž‘ ๋‘ ๋‹ฌ ๊ณต๋ถ€ํ–ˆ๋‹ค๊ณ ...</p>
            <div class="card__info">
                <div class="icon__box">
                    <div class="card__icon"></div>
                </div>
                <div class="info__box">
                    <span class="info__name">์ •์Šน์—ฐ</span>
                    <span class="info__number">์›น์Šค 24๊ธฐ</span>
                    <span class="info__star ir">๋ณ„์ด ๋‹ค์„ฏ ๊ฐœ</span>
                </div>
            </div>
            <a href="#"><span class="more">์ž์„ธํžˆ ๋ณด๊ธฐ</span></a>
        </article>
    </div>
</section>

CSS ์†Œ์Šค

ํฐํŠธ๋Š” ๋‚˜๋ˆ” ๊ณ ๋”•์„ ์‚ฌ์šฉํ•˜์˜€๊ณ , display: flex๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์„ธ ๊ฐœ์˜ ์นด๋“œ๋ฅผ ๋ฐฐ์น˜ํ•ด ์ฃผ์—ˆ์Šต๋‹ˆ๋‹ค. ์•„์ด์ฝ˜๊ณผ ๋ณ„์ ์€ ์ด๋ฏธ์ง€ ์Šคํ”„๋ผ์ดํŠธ ๊ธฐ๋ฒ•์„ ์‚ฌ์šฉํ•˜์˜€๊ณ , ๋ณ„์ ์˜ ๊ฐœ์ˆ˜์— ๋Œ€ํ•˜์—ฌ ir ํšจ๊ณผ๋ฅผ ์ถ”๊ฐ€ํ•ด ์ฃผ์—ˆ์Šต๋‹ˆ๋‹ค.

/* fonts */
@import url('https://webfontworld.github.io/naver/NanumGothic.css');
.nanum {
    font-family: 'NanumGothic';
    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;
}
.section {
    padding: 120px 0;
}
.section>h2 {
    font-size: 50px;
    line-height: 1;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 500;
}
.section>p {
    font-size: 22px;
    font-weight: 300;
    color: #666;
    text-align: center;
    margin-bottom: 70px;
}
.ir {
    display: block;
    overflow: hidden;
    font-size: 0;
    line-height: 0;
    text-indent: -9999px;
}

/* textType03 */
body {
    background-color: #C7C9FF;
}
.contents {
    display: flex;
    justify-content: space-between;
}
.contents .card {
    width: 373px;
    height: 435px;
    background-color: #fff;
    border-radius: 10px;
    position: relative;
}
.contents .card .card__desc {
    font-size: 18px;
    font-weight: 300;
    line-height: 140%;
    margin: 30px;
}
.contents .card .card__info {
    border-top: 1px solid #666;
    border-bottom: 1px solid #666;
    position: absolute;
    top: 235px;
    left: 30px;
    padding: 30px 0;
    width: 313px;
    display: flex;
}
.contents .card .more {
    display:inline-block;
    color: white;
    background-color: #2684ff;
    width:118px;
    height: 30px;
    font-size: 16px;
    line-height: 30px;
    text-align: center;
    border-radius: 20px;
    position: absolute;
    left: 127px;
    bottom: 30px;
}
.contents .card .card__info .card__icon {
    width: 60px;
    height: 60px;
    background: url(img/card03_icon01.svg)
}
.contents .card:nth-child(2) .card__info .card__icon {
    background-position-x: -60px;
}
.contents .card:nth-child(3) .card__info .card__icon {
    background-position-x: -120px;
}
.contents .card .card__info .info__box {
    margin-left: 10px;
}
.contents .card .card__info .info__name {
    font-size: 24px;
    line-height: 40px;
    font-weight: 500;
}
.contents .card .card__info .info__number {
    font-size: 16px;
    line-height: 35px;
}
.contents .card .card__info .info__star {
    width: 100px;
    height: 20px;
    background: url(img/card03_icon02.svg)
}
.contents .card:nth-child(2) .card__info .info__star {
    background-position: -100px;
}

๊ฒฐ๊ณผ

728x90

๋Œ“๊ธ€

๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. ๐Ÿฆ™

CSS
๊ด‘๊ณ  ์ค€๋น„์ค‘