λ³Έλ¬Έ λ°”λ‘œκ°€κΈ°
WebSite

μ›Ήμ‚¬μ΄νŠΈ λ§Œλ“€κΈ° : 이미지 μœ ν˜• λ ˆμ΄μ•„μ›ƒ01

by μ½”νŒŒμΉ΄ 2022. 8. 17.
728x90

λ ˆμ΄μ•„μ›ƒ : 이미지 μœ ν˜•01

λ‹€μŒκ³Ό 같은 이미지 μœ ν˜•μ˜ λ ˆμ΄μ•„μ›ƒμ„ μž‘μ—…ν•΄ 보도둝 ν•˜κ² μŠ΅λ‹ˆλ‹€.

HTML μ†ŒμŠ€

μΉ΄λ“œ μœ ν˜•κ³Ό μœ μ‚¬ν•˜κ²Œ, 두 개의 μΉ΄λ“œλ₯Ό λ§Œλ“€μ–΄ 이미지λ₯Ό λ°±κ·ΈλΌμš΄λ“œ λ°©μ‹μœΌλ‘œ μ‚½μž…ν–ˆμŠ΅λ‹ˆλ‹€. μ›Ή ν‘œμ€€ μ€€μˆ˜λ₯Ό μœ„ν•΄, a νƒœκ·Έμ—λŠ” title을 μΆ”κ°€ν•΄ μ£Όμ—ˆμŠ΅λ‹ˆλ‹€.

<section id="imageType01" class="card__wrap nexon section">
    <h2>μ„Έμƒμ˜ κ·€μ—¬μš΄ λŒ•λŒ•μ΄</h2>
    <p>강아지 μ’…λ₯˜λŠ” 맀우 λ‹€μ–‘ν•©λ‹ˆλ‹€. ν•˜μ§€λ§Œ ν•˜λ‚˜κ°™μ΄ 정말 κ·€μ—½μŠ΅λ‹ˆλ‹€.</p>
    <div class="image__inner container">
        <div class="image img1">
            <h3 class="image__title">μ„Έμƒμ˜ κ·€μ—¬μš΄ λŒ•λŒ•μ΄</h3>
            <p class="image__desc">λˆ„κ°€ λ­λž˜λ„ λŒ•λŒ•μ΄λŠ” μ°Έ κ·€μ—½λ‹€.<br>
                μ™œ λ‚˜λŠ” λŒ•λŒ•μ΄κ°€ μ—†μ„κΉŒ?</p>
            <a class="image__btn" href="#" title="μžμ„Ένžˆ 보기">
                <div class="more">μžμ„Ένžˆ 보기</div>
            </a>
        </div>
        <div class="image img2">
            <h3 class="image__title">μ„Έμƒμ˜ κ·€μ—¬μš΄ λŒ•λŒ•μ΄</h3>
            <p class="image__desc">λˆ„κ°€ λ­λž˜λ„ λŒ•λŒ•μ΄λŠ” μ°Έ κ·€μ—½λ‹€.<br>
                μ™œ λ‚˜λŠ” λŒ•λŒ•μ΄κ°€ μ—†μ„κΉŒ?</p>
            <a class="image__btn blue" href="#" title="μžμ„Ένžˆ 보기">
                <div class="more">μžμ„Ένžˆ 보기</div>
            </a>
        </div>
    </div>
</section>

CSS μ†ŒμŠ€

ν°νŠΈλŠ” λ„₯슨 Lv1 고딕을 μ‚¬μš©ν•˜μ˜€κ³ , display: flexλ₯Ό μ΄μš©ν•˜μ—¬ 두 개의 이미지λ₯Ό κ°€λ‘œλ‘œ λ°°μΉ˜ν•˜μ˜€μŠ΅λ‹ˆλ‹€.

/* 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;
}

.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: white;
    padding: 200px 30px 30px 30px;
    box-sizing: border-box;
}

.image.img1 {
    background: url(img/img01_bg01.jpg) no-repeat center;
}

.image.img2 {
    background: url(img/img01_bg02.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;
}

.image__btn {
    font-size: 16px;
    color: #fff;
    background: #E86E47;
    padding: 10px 20px;
    display: inline-block;
}

.image__btn.blue {
    background: #00A8E5;
}

κ²°κ³Ό

728x90

λŒ“κΈ€

κ°μ‚¬ν•©λ‹ˆλ‹€. πŸ¦™

CSS
κ΄‘κ³  쀀비쀑