프런트엔드-CSS

CSS 스타일링

강사: 최퍼블리셔 · 작성자: 이종춘 · 작성일: 2026-04-07 18:00:26 · 조회수: 23

스타일시트 유튜브 화면 설명(flex 사용)
목록으로
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Video Home</title>
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}

body{
font-family: Arial, sans-serif;
background-color: #0f0f0f;
color: #fff;
}

a{
text-decoration: none;
color: inherit;
}

ul,li{
list-style: none;
}

/* main */
main{
max-width: 1400px;
margin: 0 auto;
padding: 40px;
}

.title{
font-size: 32px;
font-weight: 900;
margin-bottom: 30px;
}

.video_wrap{
display: flex;
flex-wrap: wrap;
gap: 30px;
}

.video_card{
width: calc((100% - 60px) / 3);
background-color: #181818;
border-radius: 16px;
overflow: hidden;
transition: transform 0.3s, box-shadow 0.3s;
}

.video_card:hover{
transform: translateY(-8px);
box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.thumb{
width: 100%;
height: 220px;
background-color: #2b2b2b;
display: flex;
justify-content: center;
align-items: center;
font-size: 26px;
font-weight: 900;
color: #999;
}

.video_info{
padding: 20px;
}

.video_info h3{
font-size: 20px;
margin-bottom: 12px;
line-height: 1.4;
}

.video_info p{
font-size: 14px;
color: #aaa;
line-height: 1.6;
margin-bottom: 6px;
}

footer{
margin-top: 60px;
padding: 30px 0;
text-align: center;
color: #888;
font-size: 14px;
border-top: 1px solid #2c2c2c;
}

</style>
</head>
<body>


<main>
<h1 class="title">추천 영상</h1>

<div class="video_wrap">

<a href="https://www.youtube.com/" class="video_card" target="_blank">
<div class="thumb">THUMB 1</div>
<div class="video_info">
<h3>영상 제목 1</h3>
<p>채널명 1</p>
<p>조회수 12만회 · 3일 전</p>
</div>
</a>

<a href="https://www.naver.com/" class="video_card" target="_blank">
<div class="thumb">THUMB 2</div>
<div class="video_info">
<h3>영상 제목 2</h3>
<p>채널명 2</p>
<p>조회수 8.4만회 · 1주 전</p>
</div>
</a>

<a href="https://www.google.com/" class="video_card" target="_blank">
<div class="thumb">THUMB 3</div>
<div class="video_info">
<h3>영상 제목 3</h3>
<p>채널명 3</p>
<p>조회수 25만회 · 2주 전</p>
</div>
</a>

<a href="https://www.daum.net/" class="video_card" target="_blank">
<div class="thumb">THUMB 4</div>
<div class="video_info">
<h3>영상 제목 4</h3>
<p>채널명 4</p>
<p>조회수 5.1만회 · 5일 전</p>
</div>
</a>

<a href="https://www.github.com/" class="video_card" target="_blank">
<div class="thumb">THUMB 5</div>
<div class="video_info">
<h3>영상 제목 5</h3>
<p>채널명 5</p>
<p>조회수 19만회 · 4일 전</p>
</div>
</a>

<a href="https://www.instagram.com/" class="video_card" target="_blank">
<div class="thumb">THUMB 6</div>
<div class="video_info">
<h3>영상 제목 6</h3>
<p>채널명 6</p>
<p>조회수 31만회 · 1일 전</p>
</div>
</a>

</div>
</main>

<footer>
© 2026 CURSATUBE. All rights reserved.
</footer>

</body>
</html>
#스타일시트 유튜브 화면

첨부 파일

0개
첨부된 파일이 없습니다.

댓글 / 답글

0개
댓글을 작성하려면 로그인하세요.
아직 댓글이 없습니다.