Day 34. e스포츠 왼쪽 영역

SUN·2021년 8월 12일
0

8월 12일

1. 학습 내용

메인화면 ~ 경기 다시보기

HTML

<div class="esport-container">

			<div class="content-wrap">
				<div class="left">
					<div id="esport-main-article">
						<div class="article full">
							<img src="https://via.placeholder.com/150px">
							<div class="txt-wrap">
								<h3>Title</h3>
								<p>제주도에 가면 꼭 가야할 곳은 여러군데가 있지만 그 중에 하나는</p>
								<span>포모스</span>
							</div>
						</div>
						<div class="article">
							<img src="https://via.placeholder.com/150px">
							<div class="txt-wrap">
								<h3>Title</h3>
								<span>포모스</span>
							</div>
						</div>
						<div class="article">
							<img src="https://via.placeholder.com/150px">	
							<div class="txt-wrap">
								<h3>Title</h3>
								<span>포모스</span>
							</div>
						</div>
					</div>
					
					<div id="esport-replay" class="esport-section">
						<div class="title-wrap">
							<h2>경기 다시보기</h2>
						</div>

						<nav class="game-menu">
							<ul class="esport-flex-start">
								<li>
									<a href="#" class="active">
										<i></i>
										<span>MSI</span>
									</a>
								</li>
								<li>
									<a href="#">
										<i></i>
										<span>MSI</span>
									</a>
								</li>
                          - 액티브를 제외한 태그를 복사
							</ul>
						</nav>

						<ul class="play-lists esport-flex-between" >
							<li>
								<a href="#">
									<div class="image-wrap">
										<img src="https://via.placeholder.com/285px*160px">
										<div class="status-wrap esport-flex-between">
											<i></i>
											<span class="time">56:01</span>
										</div>
									</div>
									<h3>롤드컵 Day2 5세트 경기</h3>
								</a>
							</li>
                            - 6개 만들기
						</ul>
					</div>

CSS

#esport-main .content-wrap {
	overflow: hidden;
   -자식이 float가 적용되어 높이값이 나타나지 않아 
   높이값을 나타냄
	padding-top: 30px;}

#esport-main .left {
	float: left;
	width: 900px;}

#esport-main .right {
	float: right;
	width: 357px;}


#esport-main #esport-main-article {
	width: 100%;
	height: 468px;
	background-color: grey;
	border-radius: 10px;

	margin-bottom: 30px;

	overflow: hidden;}

#esport-main #esport-main-article .article {
	position: relative;
	float: left;
	width: 50%;
	height: 50%;}

#esport-main #esport-main-article .article.full {
	height: 100%;}

#esport-main #esport-main-article .article img {
	position: absolute;
	width: 100%;
	height: 100%;}

#esport-main #esport-main-article .article .txt-wrap {
	position: absolute;
	width: 100%;

	left: 0;
	bottom: 0;

	padding: 0 24px 20px;

	color: #ffffff;}

#esport-main #esport-main-article .article .txt-wrap h3 {
	font-size: 20px;
	line-height: 26px;
	font-weight: 700;}

#esport-main #esport-main-article .article .txt-wrap p {
	font-size: 14px;
	font-weight: 500;
	line-height: 19px;}

#esport-main #esport-main-article .article .txt-wrap span {
	font-size: 13px;
	margin-top: 10px;
	display: block;

	color: hsla(0, 0, 100% .7);}


여기는 공통된 부분으로 재활용 가능
.esport-section {
	border-top: solid 1px grey;
	padding-bottom: 30px;
	margin-bottom: 30px;}

.esport-section .title-wrap {
	padding: 15px 0;}

.esport-section .title-wrap h2 {
	font-size: 18px;}



#esport-replay .game-menu {
	margin-bottom: 24px;}

#esport-replay .game-menu ul li {
	margin-right: 20px;}

#esport-replay .game-menu ul li:last-child {
	margin-right: 0;}

#esport-replay .game-menu ul li a {
 	display: block;
	width: 60px;

	text-align: center;}

#esport-replay .game-menu ul li a.active i {
	background-color: purple;}

#esport-replay .game-menu ul li a.active span {
	color: purple;}

#esport-replay .game-menu ul li i {
	display: inline-block;
	width: 60px;
	height: 60px;
	background-color: grey;
	border-radius: 50%;

	margin-bottom: 6px;}

#esport-replay .game-menu li a span {
	font-size: 13px;}


#esport-replay .play-lists li {
	width: 285px;
	margin-bottom: 24px;}

#esport-replay .play-lists li a {
	display: block;}

#esport-replay .play-lists li a .image-wrap {
	position: relative;
	width: 100%;
	height: 160px;
	margin-bottom: 11px;}

#esport-replay .play-lists li a .image-wrap img {
	position: absolute;
	width: 100%;
	height: 100%;}

#esport-replay .play-lists li a .image-wrap .status-wrap {
	position: absolute;
	width: 100%;

	left: 0;
	bottom: 0;

	padding: 10px 10px;}

#esport-replay .play-lists li a .image-wrap .status-wrap i {
	display: block;
	/* 공간을 만들어주기 */

	width: 20px;
	height: 20px;
	background-color: grey;}

#esport-replay .play-lists li a .image-wrap .status-wrap .time {
	background-color: rgba(0, 0, 0, .7);
	border-radius: 3px;
	padding: 3px 5px;
	font-size: 11px;
	color: #ffffff;}

#esport-replay .play-lists li a h3 {
	font-size: 15px;}
    

추천 뉴스 ~ 전문가 칼럼(많이 본 영상, 협회 제외)

HTML

<div id="esport-news" class="esport-section">
						<div class="title-wrap">
							<h2>추천 뉴스</h2>
						</div>

						<div class="article-lists esport-flex-between">
							
							<ul class="left-lists esport-flex-between">
								<li>
									<a href="#">
										<img src="https://via.placeholder.com/226px*132px">
										<h3>Title</h3>
										<p>백수의 가장 큰 장점은 시간과 공간이 많다는 것이지만 그것이 바로</p>
									</a>
								</li>
								<li>
									<a href="#">
										<img src="https://via.placeholder.com/226px*132px">
										<h3>Title</h3>
										<p>백수의 가장 큰 장점은 시간과 공간이 많다는 것이지만 그것이 바로</p>
									</a>
								</li>
							</ul>

							<ul class="right-lists">
								<li><a href="#">크리스마스 일요일 저녁 식사는 고구마</a></li>
								<li><a href="#">크리스마스 일요일 저녁 식사는 고구마</a></li>
								<li><a href="#">크리스마스 일요일 저녁 식사는 고구마</a></li>
								<li><a href="#">크리스마스 일요일 저녁 식사는 고구마</a></li>
							</ul>
						</div>

					</div>

					<div id="esport-expert" class="esport-section">
						
						<div class="title-wrap">
							<h2>전문가 칼럼</h2>
						</div>

						<ul class="news-lists esport-flex-between">
							<li>
								<a href="#" class="esport-flex-start">
									<img src="https://via.placeholder.com/153px*86px">
									<div class="txt-wrap">
										<h3>Title</h3>
										<p>동해물과 백두산이 마르고 닳도록 하느님이 보우하사 우리나라 
										만세 무궁화 삼천리 화려가앙산 대한 사람 대한으로 길이 보전하세
										남산위에 저 소나무 철갑을 두른듯 바람서리 불변함은 우리기상일세
										무우궁화 사암천리</p>
										<span class="source">핫매치 리뷰</span>
									</div>
								</a>
							</li>
							<li>
								<a href="#" class="esport-flex-start">
									<img src="https://via.placeholder.com/153px*86px">
									<div class="txt-wrap">
										<h3>Title</h3>
										<p>동해물과 백두산이 마르고 닳도록 하느님이 보우하사 우리나라 
										만세 무궁화 삼천리 화려가앙산</p>
										<span class="source">핫매치 리뷰</span>
									</div>
								</a>
							</li>
							<li>
								<a href="#" class="esport-flex-start">
									<img src="https://via.placeholder.com/153px*86px">
									<div class="txt-wrap">
										<h3>Title</h3>
										<p>동해물과 백두산이 마르고 닳도록 하느님이 보우하사 우리나라 
										만세 무궁화 삼천리 화려가앙산</p>
										<span class="source">핫매치 리뷰</span>
									</div>
								</a>
							</li>
							<li>
								<a href="#" class="esport-flex-start">
									<img src="https://via.placeholder.com/153px*86px">
									<div class="txt-wrap">
										<h3>Title</h3>
										<p>동해물과 백두산이 마르고 닳도록 하느님이 보우하사 우리나라 
										만세 무궁화 삼천리 화려가앙산</p>
										<span class="source">핫매치 리뷰</span>
									</div>
								</a>
							</li>
						</ul>

					</div>

CSS

#esport-news .article-lists {
	align-items: flex-start;}
    - 스타트를 주어 위쪽으로 올라올 수 있도록

#esport-news .article-lists .left-lists {
	width: 472px;}	

#esport-news .article-lists .left-lists li {
	width: 226px;}

#esport-news .article-lists .left-lists li a {
	display: block;

	font-size: 16px;}

#esport-news .article-lists .left-lists li a img {
	width: 100%;
	height: 132px;

	margin-bottom: 9px;}

#esport-news .article-lists .left-lists li h3 {
	font-size: 16px;
	font-weight: 500;
	line-height: 21px;}

#esport-news .article-lists .left-lists li p {
	font-size: 14px;
	color: #777;}

#esport-news .article-lists .right-lists {
	width: 400px;}

#esport-news .article-lists .right-lists li {
	position: relative;
	margin-bottom: 5px;}

#esport-news .article-lists .right-lists li:before {
	position: absolute;
	display: inline-block;
	content: '';
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background-color: grey;
	top: 7px;}
    - 포지션을 적용해 앞의 기호와 글을 분리

#esport-news .article-lists .right-lists li a {
	padding-left: 10px;}




#esport-expert .news-lists li {
	width: 450px;

	margin-bottom: 15px;}


#esport-expert .news-lists li a img {
	width: 153px;
	height: 86px;

	margin-right: 15px;}

#esport-expert .news-lists .txt-wrap {
	width: 268px;}

#esport-expert .news-lists .txt-wrap h3 {
	font-size: 15px;
	font-weight: 500;}

#esport-expert .news-lists .txt-wrap p {
	font-size: 14px;
	color: #777777;
	line-height: 19px;
	margin-top: 4px;

	display: -webkit-box;
	overflow: hidden;
	max-height: 38px;
	-webkit-line-clamp: 2;
	/* n번째 줄부터 말줄임을 적용 */

-webkit-box-orient: vertical;
text-overflow: ellipsis;
/ 2번째 줄부터 말줄임표를 사용 /}

#esport-expert .news-lists .txt-wrap .source {
	font-size: 13px;
	color: #777777;}

2. 학습 중 어려웠던 점

비슷한 작업을 하다보니 조금 힘들어진다.

3. 해결방안

리프레시를 하면서 작업하기

4. 학습 소감

빨리 혼자서 컨텐츠를 만들어보고 싶다.

profile
안녕하세요!

0개의 댓글

관련 채용 정보