Day 41. 트위치 콘텐츠 영역 1

SUN·2021년 8월 23일

08월 23일

1. 학습 내용

HTMl

<div class="content">
		
		<div id="content-banner">
			<div class="layer">
				<div class="txt-wrap">
					<h2>Hello</h2>
					<p>Nice to meet you</p>
				</div>
				
			</div>
			
		</div>

		<div class="content-container">
			
			<div class="video-section">
				<div class="title-wrap">
					<h2>취향저격 생방송 채널</h2>
				</div>

				<div class="video-wrap">
					<ul>
						<li>
							<a href="#">
								<div class="image-wrap">
									<img src="https://via.placeholder.com/333px*186px">
									<span class="mark">생방송</span>
								</div>
								<div class="video-bottom">
									<img src="https://via.placeholder.com/40px*40px">
									<div class="txt-wrap">
										<h3>2021 LCK Summer Split</h3>
										<p class="source">LCK_Korea</p>
										<p class="game">LOL</p>

										<div class="tag-wrap">
											<span class="tag">스포츠</span>
											<span class="tag">한국어</span>
											<span class="tag">독일어</span>
											<span class="tag">후원열차</span>
										</div>
									</div>
								</div>
							</a>
						</li>
						<li>
							<a href="#">
								<div class="image-wrap">
									<img src="https://via.placeholder.com/333px*186px">
									<span class="mark">생방송</span>
								</div>
								<div class="video-bottom">
									<img src="https://via.placeholder.com/40px*40px">
									<div class="txt-wrap">
										<h3>2021 LCK Summer Split</h3>
										<p class="source">LCK_Korea</p>
										<p class="game">LOL</p>

										<div class="tag-wrap">
											<span class="tag">스포츠</span>
											<span class="tag">한국어</span>
											<span class="tag">독일어</span>
											<span class="tag">후원열차</span>
										</div>
									</div>
								</div>
							</a>
						</li>
						<li>
							<a href="#">
								<div class="image-wrap">
									<img src="https://via.placeholder.com/333px*186px">
									<span class="mark">생방송</span>
								</div>
								<div class="video-bottom">
									<img src="https://via.placeholder.com/40px*40px">
									<div class="txt-wrap">
										<h3>2021 LCK Summer Split</h3>
										<p class="source">LCK_Korea</p>
										<p class="game">LOL</p>

										<div class="tag-wrap">
											<span class="tag">스포츠</span>
											<span class="tag">한국어</span>
											<span class="tag">독일어</span>
											<span class="tag">후원열차</span>
										</div>
									</div>
								</div>
							</a>
						</li>
					</ul>
				</div>
			</div>

CSS

.content {
	overflow-y: auto;
	/*스크롤은 content 내부에서만 발생*/

	position: absolute;
	top: 50px;
	bottom: 0;
	right: 0;
	left: 240px;}

.content #content-banner {
	position: relative;
	width: 100%;
	height: 350px;
	background: url(../img/cloud.jpg) no-repeat center;
	/* background 하나로 색상 사진 반복설정 등을 설정할 수 있다. */
	background-size: cover;
	/* 원본 비율을 유지한 상태에서 이미지를 알맞게 변경 */}

.content #content-banner .layer {
	position: absolute;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);

	top: 0;
	left: 0;}

.content #content-banner .layer .txt-wrap {
	position: absolute;
	right: 200px;
	top: 170px;}

.content .content-container {
	width: 1240px;
	margin: 0 auto;}


/* 태그 디폴트 */

.content-container .tag-wrap {
	display: flex;
    flex-wrap: wrap;
	align-items: center;}

.content-container .tag-wrap .tag {
	font-size: 10px;
	color: #ffffff;
	background-color: grey;
	border-radius: 5px;

	padding: 2px 4px 0px;
	margin-right: 5px;}

.content-container .tag-wrap .tag:last-child {
	margin-right: 0;}

.content-container .txt-wrap h3 {
	font-size: 16px;
	color: #ffffff;}


/* 비디오 섹션 */

.video-section {
	padding-top: 60px;
	padding-bottom: 50px;

	border-bottom: solid 1px grey;}

.video-section .title-wrap {
	padding-bottom: 10px;}

.video-section .title-wrap h2 {
	font-size: 20px;}

.video-section .video-wrap ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;}


.video-section .video-wrap ul li {
	width: 333px;}


.video-section .video-wrap li a .image-wrap {
	position: relative;
	width: 333px;
	height: 186px;}

.video-section .video-wrap li a .image-wrap img {
	width: 100%;
	height: 100%;

	transition: transform 0.15s linear;}

.video-section .video-wrap .image-wrap:hover img {
	transform: translate(10px, -10px);}

.video-section .video-wrap li a .image-wrap .mark {
	position: absolute;

	top: 15px;
	left: 15px;

	border-radius: 5px;
	background-color: red;

	padding: 2px 4px;

	font-size: 14px;}

.video-section .video-wrap li a .video-bottom {
	display: flex;;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-start;

	margin-top: 10px;}

.video-section .video-wrap li a .video-bottom img {
	width: 40px;
	height: 40px;

	border-radius: 50%;}

.video-section .video-wrap li a .video-bottom .txt-wrap {
	width: calc(100% - 50px);}

.video-section .video-wrap .txt-wrap .source,
.video-section .video-wrap .txt-wrap .game {
	font-size: 14px;
	color: grey;}

2. 학습 중 어려웠던 점

이전에 했던 것들과 비슷한 내용이러서 어려운 점은 없었다.

3. 해결방안

4. 학습 소감

결과물이 비슷해지는 것이 재미있다.

profile
안녕하세요!

0개의 댓글