Devlog-34,NAVERスポーツカーピケット実習2

87110 ワード

学習の内容


NAVER eスポーツ実習-基本設定


HTMLドキュメント
<!DOCTYPE html>
<html>
<head>                 
	<meta charset="utf-8">
	<title>네이버</title>

	<link rel="stylesheet" type="text/css" href="css/style1.css">
</head>
CSSドキュメント
/* Default CSS */
* {
	margin: 0;
	padding: 0;

	box-sizing: border-box;
}

ol, ul {
	list-style: none;
}

a {
	text-decoration: none;
	color: #000000;
}

img {
	vertical-align: middle;
}

button {
	border: none;
}

input, textarea {
	outline: none;
}

.clearfix {
	clear: both;
}

.container {
	width: 1130px;
	margin: 0 auto;
}

.esport-flex-start {
    display: flex;
    flex-wrap: wrap;
    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;    
}

.esport-flex-between {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;    
}

.esport-container {
    width: 1280px;
    margin: 0 auto;
}

Naver e Sports実習-Naver e Sportsホームページ左側エリア


  • プライマリ・コーナー領域が追加され、前のサイトにバナーが追加されました
  • float属性を使用して3等分領域を作成できます.親ラベルを作成し、最大領域にheight: 100%値を設定し、残りのラベルを順番に作成すると、次の領域が表示されます.
  • サムネイルを設定する場合、複数行の文字には次の属性があります.height,max-height高さを属性に設定display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; max-height: 57px;
  • right-lists領域にclass(bold)を追加し、4行の太字
  • のみを適用した.
    HTMLドキュメント
    <body>
    	<main id="esport-main" role="main">
    		<div class="esport-container">
    			<div class="content-wrap">
    				<div class="top">			
    					<div class="top-banner game-shadow">
    						<a href="#">
    							<img src="https://via.placeholder.com/1280x156">
    						</a>
    					</div>
    				</div>	
    
    				<div class="left">					
    					<div id="esport-main-article">
    						<div class="article full">
    							<img src="https://via.placeholder.com/150">
    
    							<div class="txt-wrap">
    								<h3>Title Title Title Title Title Title Title Title Title Title</h3>
    								<p>동해물과 백두산이 마르고 닳도록 동해물과 백두산이 마르고 닳도록 동해물과 백두산이 마르고 닳도록 동해물과 백두산이 마르고 닳도록 동해물과 백두산이 마르고 닳도록 동해물과 백두산이 마르고 닳도록</p>
    								<span class="source">엑스포츠뉴스</span>
    							</div>
    						</div>
    
    						<div class="article">
    							<img src="https://via.placeholder.com/150">
    
    							<div class="txt-wrap">
    								<h3>Title Title Title Title Title Title Title Title Title Title</h3>
    								<span class="source">엑스포츠뉴스</span>
    							</div>
    						</div>
    
    						<div class="article">
    							<img src="https://via.placeholder.com/150">
    
    							<div class="txt-wrap">
    								<h3>Title Title Title Title Title Title Title Title Title Title</h3>
    								<span class="source">엑스포츠뉴스</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>LCK</span>
    									</a>
    								</li>
    
    								<li>
    									<a href="#">
    										<i></i>
    										<span>LCK CL</span>
    									</a>
    								</li>
    
    								<li>
    									<a href="#">
    										<i></i>
    										<span>GSL</span>
    									</a>
    								</li>
    
    								<li>
    									<a href="#">
    										<i></i>
    										<span>PWS</span>
    									</a>
    								</li>
    
    								<li>
    									<a href="#">
    										<i></i>
    										<span>BSC</span>
    									</a>
    								</li>
    
    								<li>
    									<a href="#">
    										<i></i>
    										<span>MSI</span>
    									</a>
    								</li>
    
    								<li>
    									<a href="#">
    										<i></i>
    										<span>롤드컵</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/285x160">
    										
    										<div class="status-wrap esport-flex-between">
    											<i></i>
    											<span class="time">1:08:44</span>
    										</div>
    									</div>
    
    									<h3>SUNDAY NIGHT LCK 8화</h3>
    								</a>
    							</li>
    
    							<li>
    								<a href="#">
    									<div class="image-wrap"> 
    										<img src="https://via.placeholder.com/285x160">
    										
    										<div class="status-wrap esport-flex-between">
    											<i></i>
    											<span class="time">1:08:44</span>
    										</div>
    									</div>
    
    									<h3>SUNDAY NIGHT LCK 8화</h3>
    								</a>
    							</li>
    
    							<li>
    								<a href="#">
    									<div class="image-wrap"> 
    										<img src="https://via.placeholder.com/285x160">
    										
    										<div class="status-wrap esport-flex-between">
    											<i></i>
    											<span class="time">1:08:44</span>
    										</div>
    									</div>
    
    									<h3>SUNDAY NIGHT LCK 8화</h3>
    								</a>
    							</li>
    
    							<li>
    								<a href="#">
    									<div class="image-wrap"> 
    										<img src="https://via.placeholder.com/285x160">
    										
    										<div class="status-wrap esport-flex-between">
    											<i></i>
    											<span class="time">1:08:44</span>
    										</div>
    									</div>
    
    									<h3>SUNDAY NIGHT LCK 8화</h3>
    								</a>
    							</li>
    
    							<li>
    								<a href="#">
    									<div class="image-wrap"> 
    										<img src="https://via.placeholder.com/285x160">
    										
    										<div class="status-wrap esport-flex-between">
    											<i></i>
    											<span class="time">1:08:44</span>
    										</div>
    									</div>
    
    									<h3>SUNDAY NIGHT LCK 8화</h3>
    								</a>
    							</li>
    
    							<li>
    								<a href="#">
    									<div class="image-wrap"> 
    										<img src="https://via.placeholder.com/285x160">
    										
    										<div class="status-wrap esport-flex-between">
    											<i></i>
    											<span class="time">1:08:44</span>
    										</div>
    									</div>
    
    									<h3>SUNDAY NIGHT LCK 8화</h3>
    								</a>
    							</li>
    						</ul>
    					</div>
    
    					<div id="esport-news" class="esport-section">
    						<div class="title-wrap">
    							<h2>추천 뉴스</h2>
    						</div>
    
    						<div class="article-wrap esport-flex-between">
    							<ul class="left-lists esport-flex-between">
    								<li>
    									<a href="#">
    										<img src="https://via.placeholder.com/226x132">
    										
    										<h3>title title title title title</h3>
    										<p>동해물과 백두산이 마르고 닳도록 동해물과 백두산이 마르고 닳도록</p>
    									</a>
    								</li>
    
    								<li>
    									<a href="#">
    										<img src="https://via.placeholder.com/226x132">
    										
    										<h3>title title title title title</h3>
    										<p>동해물과 백두산이 마르고 닳도록 동해물과 백두산이 마르고 닳도록</p>
    									</a>
    								</li>
    							</ul>
    
    							<ul class="right-lists">
    								<li><a href="#" class="bold">동해물과 백두산이 마르고 닳도록 동해물과 백두산이 마르고 닳도록</a></li>
    								<li><a href="#" class="bold">동해물과 백두산이 마르고 닳도록 동해물과 백두산이 마르고 닳도록</a></li>
    								<li><a href="#" class="bold">동해물과 백두산이 마르고 닳도록 동해물과 백두산이 마르고 닳도록</a></li>
    								<li><a href="#" class="bold">동해물과 백두산이 마르고 닳도록 동해물과 백두산이 마르고 닳도록</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>
    
    					<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/153x86">
    
    									<div class="txt-wrap">
    										<h3>Title</h3>
    										<p>동해물과 백두산이 마르고 닳도록 동해물과 백두산이 마르고 닳도록 동해물과 백두산이 마르고 닳도록 동해물과 백두산이 마르고 닳도록 </p>
    										<span class="source">Team LoL 핫매치 리뷰 / 프리뷰 · 인벤</span>
    									</div>
    								</a>
    							</li>
    
    							<li>
    								<a href="#" class="esport-flex-start">
    									<img src="https://via.placeholder.com/153x86">
    
    									<div class="txt-wrap">
    										<h3>Title</h3>
    										<p>동해물과 백두산이 마르고 닳도록 동해물과 백두산이 마르고 닳도록 동해물과 백두산이 마르고 닳도록 동해물과 백두산이 마르고 닳도록 </p>
    										<span class="source">Team LoL 핫매치 리뷰 / 프리뷰 · 인벤</span>
    									</div>
    								</a>
    							</li>
    
    							<li>
    								<a href="#" class="esport-flex-start">
    									<img src="https://via.placeholder.com/153x86">
    
    									<div class="txt-wrap">
    										<h3>Title</h3>
    										<p>동해물과 백두산이 마르고 닳도록 동해물과 백두산이 마르고 닳도록 동해물과 백두산이 마르고 닳도록 동해물과 백두산이 마르고 닳도록 </p>
    										<span class="source">Team LoL 핫매치 리뷰 / 프리뷰 · 인벤</span>
    									</div>
    								</a>
    							</li>
    
    							<li>
    								<a href="#" class="esport-flex-start">
    									<img src="https://via.placeholder.com/153x86">
    
    									<div class="txt-wrap">
    										<h3>Title</h3>
    										<p>동해물과 백두산이 마르고 닳도록 동해물과 백두산이 마르고 닳도록 동해물과 백두산이 마르고 닳도록 동해물과 백두산이 마르고 닳도록 </p>
    										<span class="source">Team LoL 핫매치 리뷰 / 프리뷰 · 인벤</span>
    									</div>
    								</a>
    							</li>
    						</ul>
    					</div>
    				</div>
    			</div>
    		</div>	
    	</main>	
    </body>

    CSSドキュメント1-style.css
    #esport-main .left {
    	float: left;
    	width: 900px;
    	/*height: 2000px;*/
    	/*background-color: yellow;*/
    }
    
    #esport-main-article {
    	overflow: hidden;
    	width: 100%;
    	height: 468px;
    	background-color: grey;
    	border-radius: 10px;
    
    	margin-bottom: 30px;
    }
    
    #esport-main-article .article {
    	position: relative;
    	float: left;
    	width: 50%;
    	height: 50%;
    }
    
    #esport-main-article .article.full {
    	height: 100%;
    }
    
    #esport-main-article .article img {
    	position: absolute;
    	width: 100%;
    	height: 100%;
    }
    
    #esport-main-article .article .txt-wrap {
    	position: absolute;
    	width: 100%;
    
    	padding: 0 24px 20px;
    
    	left: 0;
    	bottom: 0;
    
    	color: #ffffff;
    }
    
    #esport-main-article .article .txt-wrap h3 {
    	font-size: 20px;
    	font-weight: 700;
    	line-height: 26px;
    }
    
    #esport-main-article .article .txt-wrap p {
    	display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;    
    
        overflow: hidden;
        text-overflow: ellipsis;
        
        max-height: 57px;
    
    	margin-top: 5px;
    
    	font-size: 14px;
    	font-weight: 500;
    	line-height: 19px;
    }
    
    #esport-main-article .article .txt-wrap .source {
    	display: block;
    	margin-top: 10px;
    
    	font-size: 13px;
    	
    	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;
    	/*height: 82px;*/
    
    	text-align: center;
    }
    
    #esport-replay .game-menu ul li a.active i {
    	background-color: #4E41DB;
    }
    
    #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 ul li span{
    	font-size: 13px;
    }
    
    #esport-replay .play-lists li {
    	width: 285px;
    	margin-bottom: 24px;
    }
    
    #esport-replay .play-lists li:nth-child(4),
    #esport-replay .play-lists li:nth-child(5),
    #esport-replay .play-lists li:nth-child(6) {
    	margin-bottom: 0;
    }
    
    #esport-replay .play-lists li a {
    	display: block;
    }
    
    #esport-replay .play-lists li .image-wrap {
    	position: relative;
    	width: 100%;
    	height: 160px;
    	margin-bottom: 11px;
    }
    
    #esport-replay .play-lists li .image-wrap img {
    	position: absolute;
    
    	width: 100%;
    	height: 100%;
    }
    
    #esport-replay .play-lists li .image-wrap .status-wrap {
    	position: absolute;
    	width: 100%;
    
    	left: 0;
    	bottom: 0;
    
    	padding: 10px;
    }
    
    #esport-replay .play-lists li .image-wrap .status-wrap i {
    	display: block;
    	width: 20px;
    	height: 20px;
    	background-color: grey;
    }
    
    #esport-replay .play-lists li .image-wrap .status-wrap .time {
    	background-color: rgba(0, 0, 0, 0.7);
    	padding: 3px 5px;
    	border-radius: 3px;
    
    	font-size: 11px;
    	color: #ffffff;
    }
    
    #esport-replay .play-lists li h3 {
    	font-size: 15px;
    }
    
    #esport-news .article-wrap {
    	align-items: flex-start;
    }
    
    #esport-news .article-wrap .left-lists {
    	width: 472px;
    }
    
    #esport-news .article-wrap .left-lists li {
    	width: 226px;
    }
    
    #esport-news .article-wrap .left-lists li a {
    	display: block;
    }
    
    #esport-news .article-wrap .left-lists img {
    	width: 100%;
    	height: 132px;
    	margin-bottom: 9px;
    }
    
    #esport-news .article-wrap .left-lists h3 {
    	font-size: 16px;
    	font-weight: 500;
    	line-height: 21px;
    }
    
    #esport-news .article-wrap .left-lists p {
    	font-size: 14px;
    	color: #777;
    }
    
    #esport-news .article-wrap .right-lists {
    	width: 400px;
    }
    
    #esport-news .article-wrap .right-lists .bold {
    	font-weight: bold;
    }
    
    #esport-news .article-wrap .right-lists li {
    	position: relative;
    	margin-bottom: 5px;
    }
    
    #esport-news .article-wrap .right-lists li:before {
    	position: absolute;
    	display: inline-block;
    	content: '';
    	width: 4px;
    	height: 4px;
    	background-color: grey;
    	border-radius: 50%;
    
    	top: 6px;
    }
    
    #esport-news .article-wrap .right-lists li a {
    	display: block;
    	font-size: 16px;
    	padding-left: 15px;
    
    	max-width: 100%;
    
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    #esport-expert .news-lists li {
    	width: 450px;
    	margin-bottom: 15px;
    } 
    
    #esport-expert .news-lists li 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;
        -webkit-box-orient: vertical;
        text-overflow: ellipsis;
    }
    
    #esport-expert .news-lists .txt-wrap .source {
    	font-size: 13px;
    	color: #777777;
    }

    学習中の難点や未解決の問題

  • なし
  • 解決策

  • なし
  • 学習の心得.

  • 今日は昨日に続き、ネイバースポーツサイトのメイン左側で皮猫実習を行いました.今日は2行以上の文章に略語タグを適用する際に使用するdisplay: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;属性について学びました.
    これらの属性は実際のページでよく見られる属性で、どのような役割を果たしているのか知りたいです.今日は実習の上で、想像以上に難しい概念ではなく、略語現象を表示するためだと気づきました.実際のページに適用する属性は思ったほど難しくないと思います.