.esport-container {
width: 1280px;
margin: 0 auto;}
.esport-flex-between {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;}
.esport-flex-start {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
align-items: center;}
.esport-flex-center {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;}
.esport-flex-end {
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
align-items: center;}
<header id="esport-header">
<nav id="esport-nav">
<div class="esport-container">
- 크기 설정
<div class="nav-wrap esport-flex-between">
<div class="left esport-flex-start">
<h1><a href="#">e스포츠</a></h1>
<ul class="esport-flex-start">
<li><a href="#">GAME</a></li>
<li><a href="#">PC게임</a></li>
</ul>
</div>
<div class="center">
<ul class="esport-flex-center">
<li><a href="#" class="active">홈</a></li>
<li><a href="#">뉴스</a></li>
<li><a href="#">영상</a></li>
<li><a href="#">순위</a></li>
<li><a href="#">일정</a></li>
</ul>
</div>
<div class="right esport-flex-end">
<a href="#">로그인</a>
<a href="#">메뉴</a>
</div>
</div>
</div>
</nav>
</header>
#esport-header {
position: fixed;
background-color: #151618;
width: 100%;
border-bottom: solid 1px grey;
left: 0;
top: 0;
z-index: 99999;
- 항상 헤더부분이 가장 위로 올라오도록}
#esport-header #esport-nav {
/*height: 60px;*/}
#esport-header #esport-nav a {
color: #ffffff;}
#esport-header #esport-nav .nav-wrap {
height: 60px;
/* 부모 높이까지 영향을 줌 */}
#esport-header #esport-nav .nav-wrap .left h1 {
font-size: 20px;}
#esport-header #esport-nav .nav-wrap .left ul li:before {
display: inline-block;
content: '';
width: 1px;
height: 14px;
background-color: rgba(160, 165, 182, 0.3);
margin: 0 12px;}
#esport-header #esport-nav .nav-wrap .left ul li a {
color: grey;}
#esport-header #esport-nav .nav-wrap .center ul li {
margin-right: 24px;}
#esport-header #esport-nav .nav-wrap .center ul li:last-child {
margin-right: 0;}
#esport-header #esport-nav .nav-wrap .center ul li a {
display: inline-block;
height: 60px;
line-height: 60px;
border-bottom: solid 5px transparent;
color: grey;
font-size: 17px;}
#esport-header #esport-nav .nav-wrap .center ul li a:hover {
color: darkgrey;}
#esport-header #esport-nav .nav-wrap .center ul li a.active {
color: #ffffff;
border-bottom: solid 5px #ffffff;}
#esport-header #esport-nav .nav-wrap .right a {
border: solid 1px hsla(0, 0%, 80%, .3);
border-radius: 8px;
padding: 4px 8px;
font-size: 12px;
margin-right: 10px;}
#esport-header #esport-nav .nav-wrap .right a:last-child {
margin-left: 10px;}
<main id="esport-main" role="main" >
<div id="esport-main-top">
<div class="esport-container">
<div class="timeline-wrap">
<ul class="esport-flex-start">
<li>
<a href="#">
<span class="date">오늘 (06.05)</span>
<h2>2021 LCK AS 챔피언십 풀리그 3일차</h2>
<div class="status-wrap esport-flex-between">
<span class="live">LIVE</span>
<span class="status">진행중</span>
</div>
</a>
</li>
-6개로 만들기
</ul>
</div>
<div class="live-wrap">
<h2>라이브 중인 경기 <span class="count">2</span></h2>
<ul class="esport-flex-between">
<li>
<a href="#" class="esport-flex-between">
<img src="https://via.placeholder.com/442px*250px">
<div class="txt-wrap">
<span>진행중</span>
<h3>2021 PMPS S1 WEEKLY FINAL DAY 3</h3>
</div>
</a>
</li>
- 2개 만들기
</ul>
</div>
<div class="esport-container">
<div class="left">
</div>
<div class="right">
</div>
</div>
</div>
</div>
</main>
#esport-main {
padding-top: 61px;
/* 헤더를 포지션 fixed로 주었기 때문에 헤더 뒤로 들어간 것을 꺼내줌 */}
#esport-main-top {
background-color: #151618;}
#esport-main-top .timeline-wrap {
padding: 20px 0;}
#esport-main-top .timeline-wrap ul li {
width: 16.6%;
- 마진 1을 주기때문에 딱 떨어지는 것보다는
조금 여유있게 나눔
background-color: #272b31;
border-radius: 10px;
margin-right: 1px;}
#esport-main-top .timeline-wrap ul li:last-child {
margin-right: 0;}
#esport-main-top .timeline-wrap ul li a {
display: block;
/* 공백에도 a 태그를 적용 */
width: 100%;
padding: 14px 18px;
color: #ffffff;}
#esport-main-top .timeline-wrap li a .date {
font-size: 12px;
font-weight: 500;}
#esport-main-top .timeline-wrap li a h2 {
font-size: 13px;
margin-top: 6px;
color: #a0a5b6;}
#esport-main-top .timeline-wrap li a .status-wrap {
margin-top: 35px;}
#esport-main-top .timeline-wrap li a .status-wrap .live {
color: #ffffff;
font-size: 12px;
font-weight: 700;}
#esport-main-top .timeline-wrap li a .status-wrap .status {
font-size: 12px;
font-weight: 500;
color: red;}
#esport-main-top .live-wrap {
padding-bottom: 60px ;}
#esport-main-top .live-wrap h2 {
font-size: 18px;
color: #ffffff;
margin-bottom: 20px;}
#esport-main-top .live-wrap h2 .count {
color: #8a7cff;}
#esport-main-top .live-wrap ul li {
width: 625px;
background-color: #1f2227;
border-radius: 10px;
overflow: hidden;
-테두리를 둥글게 만들기}
#esport-main-top .live-wrap li a {
align-items: flex-start;
/*위쪽으로 정렬이 되어야한다.*/
/*display: block;
width: 100%;
height: 100%;*/}
#esport-main-top .live-wrap li a img {
width: 442px;
height: 250px;}
#esport-main-top .live-wrap li a .txt-wrap {
width: 183px;
padding: 17px 20px 22px;}
#esport-main-top .live-wrap li a .txt-wrap span {
color: red;
background-color: rgba(255, 0, 0, 0.2);
padding: 3px 7px;
border-radius: 3px;}
#esport-main-top .live-wrap li a .txt-wrap h3 {
font-size: 15px;
color: #ffffff;
margin-top: 8px;}
지금까지와 또 다른 새로운 것이 나왔지만 배웠던 것들이라 설명을 들으니 해결이 되었다.
강의 열심히 듣기
새로운 결과물을 만드는 것이 기대된다.