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

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

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

λ ˆμ΄μ•„μ›ƒ : μΉ΄λ“œ μœ ν˜•03

μ΄λ²ˆμ—λŠ” λ‹€μŒκ³Ό 같은 3개의 μΉ΄λ“œκ°€ μžˆλŠ” λ ˆμ΄μ•„μ›ƒ μœ ν˜•μ„ μž‘μ—…ν•΄ 보도둝 ν•˜κ² μŠ΅λ‹ˆλ‹€.

CSS μ†ŒμŠ€

ν°νŠΈλŠ” μ—μŠ€μ½”μ–΄ λ“œλ¦Όμ„ μ‚¬μš©ν–ˆκ³ , μ»¨ν…Œμ΄λ„ˆ μ•ˆμ— 3개의 μΉ΄λ“œλ₯Ό λ§Œλ“€μ–΄ display:flex둜 κ°€λ‘œ 정렬을 ν•΄ μ£Όμ—ˆμŠ΅λ‹ˆλ‹€. blind νš¨κ³ΌλŠ” ir νš¨κ³Όμ™€ λ§ˆμ°¬κ°€μ§€λ‘œ, κΈ€μžκ°€ λˆˆμ— 보이지 μ•Šκ²Œ μž‘μ—…ν•˜μ§€λ§Œ, 슀크린 λ¦¬λ”κΈ°μ—μ„œλŠ” μ½νžˆκ²Œλ” λ§Œλ“€μ–΄ μ›Ή 접근성을 μ€€μˆ˜ν•˜κ²Œλ” ν•©λ‹ˆλ‹€.

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

.score {
    font-family: 'SCoreDream';
    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;
}

/* blind 효과(μ›Ή μ ‘κ·Όμ„± μ€€μˆ˜)*/
.blind{
    position:absolute;
    clip:rect(0 0 0 0);
    width:1px;
    height:1px;
    margin:-1px;
    overflow:hidden
}

/* cardType03 */
body {
    background-color: #1E39A2;
}

.card__inner {
    display: flex;
}

.card__inner .card {
    width: 33.3333%;
    background-color: white;
    padding: 26px;
}

.card__inner .card:nth-child(1) {
    border-right: 1px solid #eee;
}

.card__inner .card:nth-child(2) {
    border-right: 1px solid #eee;
}

.card__header {
    position: relative;
}

.card__header img {
    border-radius: 10px;
    box-shadow: 4px 4px 5px 0 rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.card__header figcaption {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 100.8px;
    padding: 6px 12px;
    border-radius: 50px;
    background-color: #FFC738;
    text-align: center;
    font-size: 14px;
    color: #7b7b7b;
}

.card__body h3 {
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 10px;
}

.card__body p {
    color: #666;
    font-size: 16px;
    line-height: 1.7;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3; 
    -webkit-box-orient: vertical;
    margin-bottom: 30px;
}

.card__footer {
    display: flex;
    justify-content: flex-end;
}

.card__footer h4 {
    text-align: center;
    color: #dd2a2a;
}

.card__footer em {
    display: block;
    color: #666;
    font-style: normal;
}

.card__footer span {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-left: 10px;
    margin-top: 3px;
    box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.25);
}

HTML μ†ŒμŠ€

각각의 μΉ΄λ“œλŠ” header, body, footer μ„Έ 가지 μ˜μ—­μœΌλ‘œ λ‚˜λˆ„μ–΄ μž‘μ—…ν•˜μ˜€μŠ΅λ‹ˆλ‹€. footer μ˜μ—­λ„ display:flexλ₯Ό μ‚¬μš©ν•˜μ—¬ 정렬을 ν•΄ μ£Όμ—ˆμŠ΅λ‹ˆλ‹€. figcaption νƒœκ·ΈλŠ” figure νƒœκ·Έ μ•ˆμ—μ„œ, λ‹€λ₯Έ μ½˜ν…μΈ μ— λŒ€ν•œ μ„€λͺ… ν˜Ήμ€ λ²”λ‘€λ₯Ό λ‚˜νƒ€λƒ…λ‹ˆλ‹€.

<section id="cardType03" class="card__wrap score section">
    <h2 class="blind">μ˜€μ§•μ–΄μ˜ 생애</h2>
    <div class="card__inner container">
        <article class="card">
            <figure class="card__header">
                <img src="img/card03_bg01.jpg" alt="κ°“ νƒœμ–΄λ‚œ μƒˆλΌ μ˜€μ§•μ–΄">
                <figcaption>Squid</figcaption>
            </figure>
            <div class="card__body">
                <h3>κ°“ νƒœμ–΄λ‚œ μƒˆλΌ μ˜€μ§•μ–΄ : μ˜€μ§•μ–΄μ˜ 탄생을 μΆ•ν•˜ν•©λ‹ˆλ‹€!</h3>
                <p>μƒˆλΌ μ˜€μ§•μ–΄κ°€ νƒœμ–΄λ‚¬μŠ΅λ‹ˆλ‹€. μ‹¬νžˆ 경이둭지 μ•Šμ„ μˆ˜κ°€ μ—†μŠ΅λ‹ˆλ‹€. μ˜€μ§•μ–΄λ₯Ό
                    μΆ•ν•˜ν•΄ μ£Όμ—ˆμŠ΅λ‹ˆλ‹€. μ˜€μ§•μ–΄μ•Ό, μΆ•ν•˜ν•΄. κ·Έλž˜λ„ μƒˆλΌλŠ” κ·€μ—½κ²Œ μƒκ²Όλ„€μš”.</p>
            </div>
            <div class="card__footer">
                <h4>μ˜€μ§•μ–΄ν•™ 박사 <em>Usman Yosaf</em></h4>
                <span><img src="img/card03_icon01.png" alt="Usman Yosaf λ°•μ‚¬λ‹˜"></span>
            </div>
        </article>
        <article class="card">
            <figure class="card__header">
                <img src="img/card03_bg02.jpg" alt="당신을 바라보고 μžˆλŠ” μ˜€μ§•μ–΄">
                <figcaption>Squid</figcaption>
            </figure>
            <div class="card__body">
                <h3>μ”©μ”©ν•œ μ²­μ†Œλ…„ μ˜€μ§•μ–΄ : μ˜€μ§•μ–΄μ™€ λˆˆμ„ 마주쳐 λ³΄μ„Έμš”</h3>
                <p>μ˜€μ§•μ–΄λ₯Ό 바라보고 μžˆμžλ‹ˆ 썩 기뢄이 μ’‹μ§€λŠ” μ•ŠμŠ΅λ‹ˆλ‹€. μ™œ μ €λ ‡κ²Œ μƒκ²Όμ„κΉŒμš”? κ·ΈλŸ¬λ‚˜ μ˜€μ§•μ–΄μ˜ 기뢄도 λ§ˆμ°¬κ°€μ§€μΈ 것 κ°™μŠ΅λ‹ˆλ‹€. λ‹€μ†Œ μ˜ˆμ˜κ°€ μ—†λ„€μš”.</p>
            </div>
            <div class="card__footer">
                <h4>μ˜€μ§•μ–΄ν•™ 박사 <em>Usman Yosaf</em></h4>
                <span><img src="img/card03_icon01.png" alt="Usman Yosaf λ°•μ‚¬λ‹˜"></span>
            </div>
        </article>
        <article class="card">
            <figure class="card__header">
                <img src="img/card03_bg03.jpg" alt="λŠ˜μ–΄μ Έμ„œ 햇볕에 λ§λ €μ§€λŠ” μ˜€μ§•μ–΄">
                <figcaption>Squid</figcaption>
            </figure>
            <div class="card__body">
                <h3>λ°”μ‹Ή 마λ₯Έ 성체 μ˜€μ§•μ–΄ : 졜고의 μ•ˆμ£Όκ°€ λ©λ‹ˆλ‹€</h3>
                <p>버λ₯΄μž₯머리 μ—†λŠ” μ˜€μ§•μ–΄λ“€μ€ λ°”μ‹Ή 말린 뒀에 λ§›μžˆλŠ” μ•ˆμ£Όλ‘œ λ§Œλ“€μ–΄ μ‚¬λžŒλ“€μ—κ²Œ 예의λ₯Ό κ°–μΆ”κ²Œ ν•©λ‹ˆλ‹€. μš°λ¦¬λŠ” 곧 μ—­μ „ ν• λ¨Έλ‹ˆ λ§₯μ£Όμ—μ„œ λ§Œλ‚  수 μžˆμŠ΅λ‹ˆλ‹€.</p>
            </div>
            <div class="card__footer">
                <h4>μ˜€μ§•μ–΄ν•™ 박사 <em>Usman Yosaf</em></h4>
                <span><img src="img/card03_icon01.png" alt="Usman Yosaf λ°•μ‚¬λ‹˜"></span>
            </div>
        </article>
    </div>
</section>

κ²°κ³Ό

728x90

λŒ“κΈ€

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

CSS
κ΄‘κ³  쀀비쀑