네이버 e스포츠 main-right, webfont 적용, 오디오 header, main-left 일부
github소스코드
#esport-news-view li a .img-wrap .rank {
border-bottom-right-radius: 8px;
/* border-radius: 0 0 8px 0; */
}
inherits
속성값: 부모의 속성값 상속#esport-schedule .schedule-wrap .schedule-body li::after {
content: "";
display: block;
width: calc(100% - 40px);
margin: 17px auto 0;
height: 1px;
background-color: rgba(0,0,0,.05);
}
#audio-header #audio-nav .audio-nav-left li a span {
position: relative;
display: inline-block;
height: 21px;
}
#audio-header #audio-nav .audio-nav-left li a.on span::after {
position: absolute;
display: inline-block;
content: "";
border-bottom: solid 3px #222;
border-radius: 1.5px;
z-index: 1;
right: -5.5px;
left: -4.5px;
bottom: -19px;
}
#audio-header #audio-nav .audio-nav-right .search-wrap {
position: relative;
width: 180px;
height: 40px;
background-color: #ffffff;
}
#audio-header #audio-nav .audio-nav-right .search-wrap .icon-search {
position: absolute;
width: 32px;
height: 32px;
background: url(../img/search.png) no-repeat;
background-size: 20px;
background-position: center;
margin-top: 3px;
left: 0;
top: 0;
bottom: 0;
}
#audio-header #audio-nav .audio-nav-right .search-wrap input {
width: 100%;
height: 100%;
padding: 15px 8px 15px 35px;
border: solid 2px rgba(0, 86, 201,.2);
border-radius: 4px;
}
#audio-header #audio-nav .audio-nav-right .search-wrap input:focus {
border: solid 3px #000000;
}
position:fixed
로 인해 3차원 속성을 가지게 되어 main 태그 위로 겹쳐지게 되었다. main의 내용물이 header 아래에서부터 시작하게 하기 위해 padding-top
사용해주었다.#audio-header {
position: fixed;
width: 100%;
background-color: #ffffff;
border-bottom: solid 1px #efeff4;
left: 0;
top: 0;
z-index: 999;
}
#audio-main {
width: 100%;
height: 2000px;
padding-top: 62px;
background-color: #f6f8fa;
}
.audio-section .audio-header .arrow {
width: 16px;
height: 16px;
background: url(../img/next.png) no-repeat;
background-size: 14px;
margin: 3px 0 0 5px;
}
overflow:hidden
, 좌우에 float을 사용해서 배치작업을 자주 했었다. 이번엔 내부 버튼 중 main의 영역을 벗어나는 요소가 있어서 hidden을 사용할 수 없었다. 이럴 때는 flex로 배치를 할 수 있다.#audio-main .audio-container {
/* overflow: hidden; */
align-items: flex-start;
height: 100%;
}
#audio-main .audio-main-left {
/* float: left; */
width: 700px;
background-color: mistyrose;
}
#audio-main .audio-main-right {
/* float: right; */
width: 330px;
height: 100%;
background-color: linen;
}
display:none
을 사용해 요소를 사라지게 했다. 해당 요소는 absolute로 3차원 속성이라 사라져도 기존 레이아웃에 영향을 미치지 않는다.#audio-today .audio-slide-wrap .btn {
display: none;
position: absolute;
width: 44px;
height: 44px;
background-color: olive;
border-radius: 50%;
top: 50%;
transform: translateY(-50%);
}
#audio-today .audio-slide-wrap:hover .btn {
display: initial;
}
#audio-today .audio-slide-wrap .audio-slide .txt-wrap {
width: calc(100% - 430px);
}
강의를 보면 강의를 촬영한 날짜의 웹사이트 모습과 현재 모습이 다른 경우가 꽤 자주 있다. 네이버를 사용하면서 레이아웃의 변화를 크게 느끼지 못했는데, 보이지않는 곳에서 개발자들이 조금 더 나은 UI를 위해 계속 노력하고 있음이 느껴졌다.