네이버 뉴스홈페이지 main-left, main-right, footer, 네이버 연예뉴스 header
github소스코드
<div class="img-wrap">
<img src="https://via.placeholder.com/220x140" alt="">
<h4>윤희숙 “죽음으로 도망쳐 성범죄
없던 일로…악순환 끊자”</h4>
<div class="btn-wrap news-flex-start">
<i class="icon-1"></i>
<i class="icon-2"></i>
</div>
</div>
#news-main .news-left .news-main-wrap.news-custome .news-main-body .img-wrap {
position: relative;
width: 300px;
height: 190px;
}
#news-main .news-left .news-main-wrap.news-custome .news-main-body .img-wrap .btn-wrap {
position: absolute;
right: 0;
top: 0;
}
#news-main .news-left .news-main-wrap.news-custome .news-main-body .img-wrap .btn-wrap i {
width: 24px;
height: 24px;
}
flex
사용 시 align-item
: 주로 center로 많이 사용하는데 인기 뉴스의 header 부분 정렬할 때 start 사용했다. 미리 만들어 둔 flex 클래스는 바꾸지 않고 cascading을 이용해 특정 속성만 변경해주었다.#news-main .news-right #news-popular .news-popular-header {
margin-bottom: 10px;
align-items: flex-start;
}
text-transform:uppercase
활용<div class="news-today-header news-flex-start">
<h3>today</h3>
<span>07.28 (수)</span>
</div>
#news-main .news-right #news-today .news-today-header h3 {
font-size: 14px;
text-transform: uppercase;
}
#news-main .news-right .news-today-body .news-stock-wrap .news-stock-search-wrap .btn-search::before {
content: "";
display: inline-block;
width: 18px;
height: 18px;
background-image: url(../img/search.png);
background-repeat: no-repeat;
background-size: 18px;
margin: 3px 0 0 2px;
}
shop-footer
가져와서 변형해서 사용했다.margin-top, bottom
에서만 일어나고 left, right
에선 일어나지 않는다.border-left
를 주니 실제 페이지처럼 되지 않았다.border-right
를 주었더니 원하는 대로 되었다. 요즘 웹프론트만 계속 만들다보니 자꾸만 기능을 넣고 싶어진다. 빨리 영상강의를 다 보고 나면 혼자서 공부해보고 싶다.