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

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

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

๋ ˆ์ด์•„์›ƒ : ์ด๋ฏธ์ง€ ํ…์ŠคํŠธ ์œ ํ˜•01

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

HTML ์†Œ์Šค

๋จผ์ €, container ๋ฐ•์Šค ์•ˆ์— ํ…์ŠคํŠธ์™€ ์ฒซ๋ฒˆ์งธ ์ด๋ฏธ์ง€, ๋‘๋ฒˆ์งธ ์ด๋ฏธ์ง€๋ฅผ ์‚ฝ์ž…ํ•  div ๋ฐ•์Šค๋ฅผ 3๊ฐœ ๋งŒ๋“ค์–ด ์ฃผ์—ˆ์Šต๋‹ˆ๋‹ค. ํ…์ŠคํŠธ ๋ฐ•์Šค์—๋Š” ์ œ๋ชฉ, ์„ค๋ช…, ๋‚ด์šฉ ๋ชฉ๋ก์„ ์ž‘์„ฑํ•ด ์ฃผ์—ˆ๊ณ , ์ด๋ฏธ์ง€ ๋ฐ•์Šค์—๋Š” ์ด๋ฏธ์ง€์™€ ๋งํฌ๋ฅผ ์ž‘์—…ํ•ด ์ฃผ์—ˆ์Šต๋‹ˆ๋‹ค.

<section id="imgTextType" class="imgText__wrap nexon section gray">
    <h2 class="blind">์œ ์šฉํ•œ ์‚ฌ์ดํŠธ ์‚ดํŽด๋ณด๊ธฐ</h2>
    <div class="imgText__inner container">
        <div class="imgText__txt">
            <span>์ด๋ฏธ์ง€ ํ…์ŠคํŠธ ์œ ํ˜•01</span>
            <h3>์œ ์šฉํ•œ ์‚ฌ์ดํŠธ ์‚ดํŽด๋ณด๊ธฐ</h3>
            <p>
                ์›น๋””์ž์ด๋„ˆ, ์›น ํผ๋ธ”๋ฆฌ์…”, ํ”„๋ก ํŠธ์•ค๋“œ ๊ฐœ๋ฐœ์ž๋ฅผ ์œ„ํ•œ ์œ ์šฉํ•œ ์‚ฌ์ดํŠธ์ž…๋‹ˆ๋‹ค.
            </p>
            <ul>
                <li><a href="#">ํŠœํ† ๋ฆฌ์–ผ ์‚ฌ์ดํŠธ</a></li>
                <li><a href="#">๋ ˆํผ๋Ÿฐ์Šค ์‚ฌ์ดํŠธ</a></li>
                <li><a href="#">์›นํฐํŠธ ์‚ฌ์ดํŠธ</a></li>
                <li><a href="#">CSS ์‚ฌ์ดํŠธ</a></li>
                <li><a href="#">WebGL ์‚ฌ์ดํŠธ</a></li>
                <li><a href="#">Youtube ์‚ฌ์ดํŠธ</a></li>
            </ul>
        </div>
        <div class="imgText__img img1">
            <a href="#">๋ ˆํผ๋Ÿฐ์Šค ์‚ฌ์ดํŠธ</a>
        </div>
        <div class="imgText__img img2">
            <a class="blue" href="#">ํŠœํ† ๋ฆฌ์–ผ ์‚ฌ์ดํŠธ</a>
        </div>
    </div>
</section>

CSS ์†Œ์Šค

์„ธ ๊ฐœ์˜ div ๋ฐ•์Šค๋Š” flex์™€ space-between์„ ์ด์šฉํ•ด ๋ ˆ์ด์•„์›ƒ ์ž‘์—…์„ ํ•ด ์ฃผ์—ˆ์Šต๋‹ˆ๋‹ค. ์ด๋ฏธ์ง€๋Š” ๋ฐฑ๊ทธ๋ผ์šด๋“œ ํ˜•์‹์œผ๋กœ ์‚ฝ์ž…ํ•ด ์ฃผ์—ˆ์Šต๋‹ˆ๋‹ค.

/* imgTextType */
.imgText__inner {
    display: flex;
    justify-content: space-between;
}
.imgText__inner > div {
    width: 32%;
    height: 500px;
}
.imgText__txt span {
    font-size: 16px;
    color: #666;
    text-decoration: underline;
    text-underline-position: under;
    margin-bottom: 20px;
    display: block;
}
.imgText__txt h3 {
    font-size: 50px;
    font-weight: 300;
    word-break: keep-all;
    line-height: 1.4;
    margin-bottom: 20px;
}
.imgText__txt p {
    font-size: 18px;
    font-weight: 300;
    line-height: 1.5;
    color: #666;
    margin-bottom: 10px;
}
.imgText__txt ul {
    font-size: 18px;
    font-weight: 300;
    line-height: 1.6;
}
.imgText__txt ul li {
    position: relative;
    padding-left: 20px;
}
.imgText__txt ul li a {
    color: #666;
}
.imgText__txt ul li::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    position: absolute;
    left: 5px;
    top: 9px;
    background-color: #666;
}
.imgText__img {
    border-radius: 10px;
    position: relative;
}
.imgText__img a {
    position: absolute;
    left: 30px;
    bottom: 30px;
    background-color: #7c2b39;
    color: #fff;
    font-size: 18px;
    padding: 10px 30px;
    border-radius: 30px;
    display: inline-block;
}
.imgText__img a.blue {
    background-color: #2b387c;
}
.imgText__img.img1 {
    background: url(img/imgText01_bg01.jpg) no-repeat center / cover;
}
.imgText__img.img2 {
    background: url(img/imgText01_bg02.jpg) no-repeat center / cover;
}

๊ฒฐ๊ณผ

728x90

๋Œ“๊ธ€

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

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