[大邱AI学校]開発ログ29日目210805


学習内容


1.NAVERゲーム(1)

  • game.html新規ファイル.
  • 1)NAVERヘッドエリア

    <body id="game-body">
    
    
    
    
    	<header id="game-header">
    
    
    		<div class="game-container">
    
    			<nav class="game-flex-between">
    
    				<div class="left game-flex-start">
    					<h1>
    						<a href="#">GAME</a>
    					</h1>
    
    					<ul class="game-flex-start">
    						<li><a href="#">e스포츠</a></li>
    						<li><a href="#">PC게임</a></li>
    					</ul>
    				</div>
    
    
    
    				<div class="right game-flex-end">
    
    					<div class="search-wrap game-flex-start">
    						<input type="text" placeholder="라운지, 게시물 검색">
    						<button type="button" class="btn-search"></button>				
    					</div>
    
    					<div class="ticket-wrap">
    						<a href="#" class="btn-ticket"></a>
    						<p class="bubble-msg">응모 티켓 받고 꿀템 도전!</p>
    					</div>
    
    					<a href="#" class="btn-login">로그인</a>
    				
    				</div>
    
    			</nav>
    			
    
    
    
    			<div class="game-events-wrap game-flex-between">
    
    				
    				<div class="event-wrap one">
    
    					<div class="event-title-wrap">
    						<span>HOT</span>
    						<h2>
    							디아블로 이모탈<br>
    							알파 테스트 참가 이벤트
    						</h2>
    					</div>
    					
    				</div>
    
    
    				<div class="event-wrap two">
    
    					<div class="event-title-wrap">
    						<span>HOT</span>
    						<h2>
    							디아블로 이모탈<br>
    							알파 테스트 참가 이벤트
    						</h2>
    					</div>
    					
    				</div>
    
    
    				<div class="event-wrap three">
    
    					<div class="event-title-wrap">
    						<span>HOT</span>
    						<h2>
    							디아블로 이모탈<br>
    							알파 테스트 참가 이벤트
    						</h2>
    					</div>
    					
    				</div>
    			</div>
    		</div>		
    
    	</header>
    
    
    
    </body>
    css↓
    /* 네이버 게임 */
    
    .game-container {
    	width: 1280px;
    	margin: 0 auto;
    }
    
    .game-flex-between {
    	display: flex;
    	flex-wrap: wrap;
    	justify-content: space-between;
    	align-items: center;
    }
    
    .game-flex-start {
    	display: flex;
    	flex-wrap: wrap;
    	align-items: center;
    }
    
    .game-flex-end {
    	display: flex;
    	flex-wrap: wrap;
    	justify-content: flex-end;
    	align-items: center;
    }
    
    .game-flex-center {
    	display: flex;
    	flex-wrap: wrap;
    	justify-content: center;
    	align-items: center;
    }
    
    .game-shadow {
    	box-shadow: 0 2px 30px 0 rgba(0 0 0 / 6%);
    }
    
    .game-p-30 {
    	padding: 30px;
    }
    
    .font-17 {
    	font-size: 17px;
    }
    
    .font-19 {
    	font-size: 19px;
    }
    
    .font-400 {
    	font-weight: 400;
    }
    
    .font-color-red {
    	color: red;
    }
    
    #game-body {
    	background-color: #f8f9fd;
    }
    
    
    
    
    /* 네이버 게임 헤더영역 */
    
    #game-header {
    	width: 100%;
    	background-color: #4e41db;
    }
    
    #game-header nav {
    	height: 60px;
    }
    
    #game-header nav .left {
    
    }
    
    #game-header nav .left h1 {
    	font-size: 20px;
    }
    
    #game-header nav .left h1 a {
    	color: #fff;
    }
    
    #game-header nav .left ul {
    
    }
    
    #game-header nav .left ul li {
    
    }
    
    #game-header nav .left ul li a {
    	color: gray;
    	font-size: 18px;
    }
    
    #game-header nav .left ul li a:before {
    	content: '';
    	display: inline-block;
    	width: 1px;
    	height: 14px;
    	border-radius: .5px;
    	background-color: #9da5b6;
    
    	margin: 0 12px;
    }
    
    #game-header nav .right {
    
    }
    
    #game-header nav .right .search-wrap {
    	width: 300px;
    	border-radius: 20px;
    	background-color: rgba(0, 0, 0, 0.28);
    
    	overflow: hidden;
    	/* 여기에서 overflow: hidden을 적용하지 않으면, border-radius가 적용되지 않는다. */
    	/* search-wrap 위에 input과 button 태그가 있기 때문. */
    }
    
    #game-header nav .right .search-wrap input {
    	width: calc(100% - 38px);
    	height: 38px;
    	padding: 10px 11px 9px 14px;
    	border: none;
    	background-color: transparent;
    
    	color: #fff;
    	font-size: 15px;
    }
    
    #game-header nav .right .search-wrap input::placeholder {  
    	color: lightgrey;
    }
    /* ::placeholder 선택자를 이용하여, input태그의 placeholder글자에 색상을 지정할 수 있다.! */
    
    
    
    #game-header nav .right .search-wrap input:focus {
    	outline: none;
    }
    
    #game-header nav .right .search-wrap .btn-search {
    	width: 38px;
    	height: 38px;
    	background-color: transparent;
    	border: none;
    
    }
    
    #game-header nav .right .ticket-wrap {
    	position: relative;
    	width: 40px;
    	height: 40px;
    	margin-left: 10px;
    }
    
    #game-header nav .right .ticket-wrap .btn-ticket {
    	display: block;
    	width: 40px;
    	height: 40px;
    	border: solid 1px #fff;
    }
    
    #game-header nav .right .ticket-wrap .bubble-msg {
    	position: absolute;
    	width: 165px;
    	background-color: #697183;
    	border-radius: 8px;
    
    	padding: 10px 12px;
    	top: 50px;
    
    	left: 50%;
    	transform: translateX(-50%);
    	/* 포지션이 absolute인 경우에는 margin: 0 auto;로 x축 중앙정렬을 할 수 없다. */
    	/* left: 50%, transform: translate(-50%);로 x축 중앙정렬을 맞춰 준다. */
    
    	font-size: 12px;
    	color: #fff;
    	font-weight: 600;
    
    	z-index: 100;
    }
    
    #game-header nav .right .btn-login {
    	width: 60px;
    	border: solid 1px hsla(0, 0%, 80%, 0.3);
    	border-radius: 8px;
    
    	padding: 7px 0 6px;
    	margin-left: 10px;
    
    	font-size: 12px;
    	color: #fff;
    	text-align: center;
    }
    
    
    #game-header .game-events-wrap {
    	padding: 80px 0;
    }
    
    #game-header .game-events-wrap .event-wrap {
    	position: relative;
    	width: 407px;
    	height: 264px;
    	border-radius: 40px;
    
    	top: 0;
    	transition: top linear 0.3s;
    }
    
    #game-header .game-events-wrap .event-wrap:hover {
    	top: -20px;
    }
    
    #game-header .game-events-wrap .event-wrap.one {
    	background-color: rgb(112, 104, 236);
    }
    
    #game-header .game-events-wrap .event-wrap.two {
    	background-color: rgb(69, 39, 39);
    }
    
    #game-header .game-events-wrap .event-wrap.three {
    	background-color: rgb(112, 177, 181);
    }
    
    #game-header .game-events-wrap .event-wrap .event-title-wrap {
    	position: absolute;			
    
    	left: 30px;
    	bottom: 30px;
    
    	color: #fff;
    }
    
    #game-header .game-events-wrap .event-wrap .event-title-wrap span {
    	display: inline-block;  
    	/* display: block;으로 지정하면 width값을 지정해야 하지만, inline-block으로 지정하고 width값을 지정하지 않으면 width가 자동적용된다. */
    	border: solid 2px #fff;
    	border-radius: 10px;
    
    	padding: 3px 6px 3px;
    	margin-bottom: 15px;
    
    	font-size: 12px;
    	font-weight: 600;
    
    	text-align: center;
    }
    
    #game-header .game-events-wrap .event-wrap .event-title-wrap h2 {
    	font-size: 20px;
    }

    難点と解決策


  • カセットシャドウ発生器:https://cssgenerator.org/box-shadow-css-generator.html

  • Inputラベルのplaceholderフォントの色を変更できますか?
    http://triki.net/prgm/3016(通過::placeholdercss属性可)→:クルアーンを1つ試してもいいですか(X, 콜럼 하나는 안됨)
  • absolute位置はmarify:0 auto;道が作れないx축 중앙정렬left: 50%; transform: translateX(-50%);
  • 学習の心得.


    もっと練習して、よく使うcssコードをclassにして使います.