728x90
λ°μν

βοΈ μ΄λ―Έμ§ μ ν 01 βοΈ
01. λ μ΄μμ ꡬμνκΈ°
λ μ΄μμμ ꡬμν λλ, μ€μΌμΉνλ©΄μ μΈλΆ λ΄μ©μ μ 보κΉμ§ ꡬ체μ μΌλ‘ κ³νν©λλ€.
02. μμ(div) λ§λ€κΈ° : <body>
section μ μλ©ν± λ§ν¬μ
νκ³ , id λ‘ μ΄λ¦μ μ§μ΄μ€λλ€.
μΉ΄λ μμ 3κ°(article)μ λ§λ€κ³ , μ λͺ©κ³Ό λ΄μ©μ μ
λ ₯ν©λλ€.
μ€κ° μ€κ°μ λΈλΌμ°μ λ₯Ό μ΄ν΄λ³΄λ©° μ λ§λ€μ΄μ§κ³ μλμ§ νμΈνλ κ³Όμ μ΄ νμν©λλ€.
<section id="imageType" class="image__wrap nexon section"> <h2>λμ μ΄ κ³³μ μ΄λμ</h2> <p>μ°λ¦¬ λͺ¨λμ λ§μμ΄ νΈμν΄μ§λ νλ§ μ₯μλ₯Ό μκ°ν©λλ€.</p> <div class="image__inner container"> <article class="image img1"> <h3 class="tit">λ€κ½μ΄ κ°λν μ μμ§μμ</h3> <p class="desc">λλ¬΄κ° νμ΄μ£Όλ κ·Έλμ μμ μ΄λμ΄λ κ½λ€μ λ°λΌλ³΄λ μμμ ν΄λ³΄μΈμ. λλ¬΄κ° νμ΄μ£Όλ κ·Έλμ μμ μ΄λμ΄λ κ½λ€μ λ°λΌλ³΄λ μμμ ν΄λ³΄μΈμ. λλ¬΄κ° νμ΄μ£Όλ κ·Έλμ μμ μ΄λμ΄λ κ½λ€μ λ°λΌλ³΄λ μμμ ν΄λ³΄μΈμ.</p> <a class="btn" href="#">μμΈν보기</a> </article> <article class="image img2"> <h3 class="tit white">νΈλ₯Έ λ°λμ κΈΈλͺ©μμ</h3> <p class="desc white">μμνκ³ μμν λ°λμ΄ λ§μμ λ€λ
μ΄λ κ·Έκ³³μΌλ‘ ν¨κ» κ° λ΄
μλ€. μμνκ³ μμν λ°λμ΄ λ§μμ λ€λ
μ΄λ κ·Έκ³³μΌλ‘ ν¨κ» κ° λ΄
μλ€. μμνκ³ μμν λ°λμ΄ λ§μμ λ€λ
μ΄λ κ·Έκ³³μΌλ‘ ν¨κ» κ° λ΄
μλ€.</p> <a class="btn" href="#">μμΈν보기</a> </article> </div> </section>
02. style(css) μ€μ νκΈ° : <style>
/* fonts */ @import url('https://webfontworld.github.io/NexonLv1Gothic/NexonLv1Gothic.css'); .nexon { font-family: 'NexonLv1Gothic'; font-weight: 300; } /* reset */ * { margin: 0; padding: 0; } a { text-decoration: none; color: #000; } img { width: 570px; } h1, h2, h3, h4, h5, h6 { font-weight: normal; } /* common */ .container { width: 1160px; padding: 0 20px; margin: 0 auto; min-width: 1160; } .section { padding: 120px 0; } .section > h2 { font-size: 50px; line-height: 1; text-align: center; margin-bottom: 20px; } .section > p { font-size: 22px; color: #666; text-align: center; margin-bottom: 70px; } /* imageType01 */ .image__wrap {} .image__inner { display: flex; justify-content: space-between; } .image { width: 49%; height: 370px; padding: 197px 30px 30px 30px; box-sizing: border-box; /* padding μ μν₯μΌλ‘ μ 체 λΆνΌκ° 컀μ§λ κ² λ°©μ§*/ } .image.img1 { background: url(img/image_bg01_01.jpg) no-repeat center / cover ; } .image.img2 { background: url(img/image_bg01_02.jpg) no-repeat center / cover ; } .image .tit { font-size: 32px; margin-bottom: 10px; } .image .tit.white { color: #fff } .image .desc { font-size: 16px; font-weight: 400; line-height: 1.5; margin-bottom: 10px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; /* clamp μ€λ°κΏ 2μ€ μ΄μ λλ©΄ ... μΌλ‘ λ°λ - '3μ€ ν¨κ³Ό' κ²μν΄μ μ¬μ© */ -webkit-box-orient: vertical; } .image .desc.white { color: #fff; } .image .btn { font-size: 16px; color: #fff; background: #755C2B; padding: 10px 20px; display: inline-block; }
03. 결과보기
728x90
λ°μν
'CSS > Layout_Site' μΉ΄ν κ³ λ¦¬μ λ€λ₯Έ κΈ
μ΄λ―Έμ§ μ ν (3) (2) | 2022.08.22 |
---|---|
μ΄λ―Έμ§ μ ν (2) (2) | 2022.08.18 |
μΉ΄λ μ ν (3) (8) | 2022.08.11 |
μΉ΄λ μ ν (2) (7) | 2022.08.10 |
μΉ΄λ μ ν (1) (8) | 2022.08.09 |
λκΈ