<div id="esport_schedule">
<h2>e스포츠 경기 일정/결과</h2>
<div class="schedule_wrap">
<div class="schedule_header esport_flex_between">
<button class="arrow arrow_left"></button>
<span>06.05 토</span>
<button class="arrow arrow_right"></button>
</div>
<div class="schedule_body">
<ul>
<li>
<h3>PWS : EAST ASIA PHASE 2 Wild Card W5</h3>
<div class="status_wrap esport_flex_center">
<span class="status">진행중</span>
<span class="time">10:00</span>
</div>
</li>
<li>
<h3>PWS : EAST ASIA PHASE 2 Wild Card W5</h3>
<div class="status_wrap esport_flex_center">
<span class="status">진행중</span>
<span class="time">10:00</span>
</div>
</li>
</ul>
</div>
</div>
</div>
#esport_schedule h2{
font-size: 18px;
}
#esport_schedule .schedule_wrap{
margin-top: 15px;
border: solid 1px gray;
border-radius: 8px;
}
#esport_schedule .schedule_wrap .schedule_header{
padding: 10px 15px;
border-bottom: solid 1px gray;
}
#esport_schedule .schedule_wrap .schedule_header .arrow{
width: 20px;
height: 20px;
}
#esport_schedule .schedule_wrap .schedule_header .arrow.arrow_left{
background-color: yellow;
}
#esport_schedule .schedule_wrap .schedule_header .arrow.arrow_right{
background-color: greenyellow;
}
#esport_schedule .schedule_wrap .schedule_header span{
font-size: 18px;
font-weight: 800;
}
#esport_schedule .schedule_body{
padding: 17px 0;
}
#esport_schedule .schedule_body li{
/*padding: 17px 0;*/
}
#esport_schedule .schedule_body li:first-child:after{
content: '';
display: block;
width: calc(100% - 40px);
height: 1px;
background-color: rgba(0, 0, 0, .05);
margin: 17px auto;
}
#esport_schedule .schedule_body li h3{
font-size: 14px;
margin-bottom: 12px;
text-align: center;
}
#esport_schedule .schedule_body li .status_wrap:hover{
cursor: pointer;
background-color: lightyellow;
}
#esport_schedule .schedule_body li .status_wrap .status{
background-color: rgba(255, 0, 0, .1);
border-radius: 3px;
margin-right: 4.5px;
padding: 2px 4px;
color: red;
font-size: 11px;
font-weight: 500;
}
#esport_schedule .schedule_body li .status_wrap .time{
position: relative;
top: -2px;
font-size: 15px;
font-weight: 700;
}
(1) font-family
- font-family: Arial, Times, Sans-serif;
: 글자 서체를 적용하는 속성. 첫 번째 서체를 적용하고, 그 서체가 해당브라우저에 없거나 적용할 수 없다면 그 다음 서체로 대체된다. 어떤 브라우저에서도 항상 적용되는 Sans-serif는 고정으로 마지막에 넣어주어야한다.
(2) 구글폰트 적용하기
: 구글폰트에 있는 서체들을 링크를 걸어서 적용할 수 있다.
div{
width: 100%;
height: 100%;
background-color: blue;
}
기본적으로 위와 같은 방식으로 너비값과 높이값을 설정해 영역의 크기를 설정한다. 그러나 3차원 영역일 경우 공간의 상하좌우 위치를 설정하여 크기를 설정할 수 도 있다.
div{
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
background-color: green;
}
위와 같이 left, right 값에 0을 주면 너비 100%와 같고, top, bottom에 0을 주면 높이 100%와 같은 값이 되어 영역이 설정된다.
오늘 배운 3차원요소 영역 크기 지정하는 방법이 조금 어려웠다. 하지만 아직 초급수준에서는 몰라도 괜찮은 수준이라고 하셔서 이런게 있구나 하고 이해했다. 상하좌우지점을 하나씩 맞춰서 한다는게 깨질우려가 많지 않을까 걱정되고 궁금하지만 다음에 조금더 레벨이 올랐을 때 활용할 기회가 오면 좋겠다.
오늘도 새로운 레이아웃을 만들어보아서 좋았다. 이런 레이아웃을 잘 구성해서 만드는 것이 중요할 것같다. 그리고 서체도 깨지지 않도록 주의해야겠다.