728x90
반응형
사이트 만들기(이미지 유형 - 01)
이미지가 삽입된 형식의 사이트를 만들 수 있습니다.
CSS
/* imageType */
.image__inner {
display: flex;
justify-content: space-between;
}
.image {
width: 49%;
height: 370px;
color: #fff;
padding: 200px 30px 30px 30px;
box-sizing: border-box;
}
.image.img1 {
background: url(img/imageType01_01.jpg) no-repeat center;
}
.image.img2 {
background: url(img/imageType01_02.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;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.image__btn {
font-size: 16px;
color: #fff;
background-color: #B45A30;
padding: 10px 20px;
display: inline-block;
}
.image__btn.black {
background-color: #21201c;
}
.image.img1 {
background: url(img/imageType01_01.jpg) no-repeat center;
}
.image.img2 {
background: url(img/imageType01_02.jpg) no-repeat center;
}
이미지를 백그라운드 방식으로 넣을 수 있습니다.
HTML
<section id="imageType01" class="image__wrap nexon section">
<h2>고양이 알아보기</h2>
<p>고양이에 대해서 알아보는 시간을 가집시다.</p>
<div class="image__inner container">
<article class="image img1">
<h3 class="image__title">고양이 알아보기</h3>
<p class="image__desc">고양이에 대해서 알아보는 즐거운 시간이 되시길 바랍니다. 언제 어디서나 귀엽습니다. 귀여운 고양이에 대해서 알아보는 시간을 가질 거랍니다. 고양이 최고...</p>
<a class="image__btn" href="/" title="자세히보기">자세히 보기</a>
</article>
<article class="image img2">
<h3 class="image__title">고양이 알아보기</h3>
<p class="image__desc">고양이에 대해서 알아보는 즐거운 시간이 되시길 바랍니다. 언제 어디서나 귀엽습니다. 귀여운 고양이에 대해서 알아보는 시간을 가질 거랍니다. 고양이 최고...</p>
<a class="image__btn black" href="/" title="자세히보기">자세히 보기</a>
</article>
</div>
</section>
결과
'SiteType' 카테고리의 다른 글
사이트 만들기 (이미지 유형 - 03) (4) | 2022.08.20 |
---|---|
사이트 만들기 (이미지 유형 - 02) (2) | 2022.08.17 |
사이트 만들기(카드 유형 - 03) (9) | 2022.08.10 |
사이트 만들기(카드 유형 - 02) (9) | 2022.08.09 |
사이트 만들기(카드 유형 - 01) (8) | 2022.08.08 |
댓글