div+css布局模仿优酷视频播放页详情页代码
代码语言:html
所属分类:布局界面
代码描述:div+css布局模仿优酷视频播放页详情页代码
代码标签: div css 布局 模仿 优酷 视频 播放页 详情页 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>优酷视频 - 这!就是街舞 第六季 - 沉浸式播放页</title>
<style>
:root {
--yk-blue: #0d9bf2;
--yk-dark-bg: #191919;
--yk-panel-bg: #232323;
--yk-text-main: #ffffff;
--yk-text-sub: #999999;
--yk-gold: #e0b676;
--yk-hover: rgba(255, 255, 255, 0.1);
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
background-color: var(--yk-dark-bg);
color: var(--yk-text-main);
height: 100vh;
display: flex;
flex-direction: column;
overflow-x: hidden;
}
/* --- Header --- */
header {
height: 60px;
background-color: #1d1d1d;
display: flex;
align-items: center;
padding: 0 24px;
border-bottom: 1px solid #333;
z-index: 100;
}
.logo {
color: var(--yk-blue);
font-weight: 900;
font-size: 24px;
margin-right: 40px;
letter-spacing: -1px;
cursor: pointer;
}
.logo span { color: #ff0055; }
.nav-links {
display: flex;
gap: 20px;
font-size: 15px;
margin-right: auto;
}
.nav-links a { color: var(--yk-text-main); text-decoration: none; opacity: 0.8; transition: 0.2s;}
.nav-links a:hover { opacity: 1; color: var(--yk-blue); }
.search-bar {
position: relative;
width: 400px;
margin-right: 30px;
}
.search-bar input {
width: 100%;
background: rgba(255,255,255,0.1);
border: none;
height: 36px;
border-radius: 18px;
padding: 0 40px 0 20px;
color: white;
outline: none;
transition: 0.3s;
}
.search-bar input:focus {
background: rgba(255,255,255,0.2);
}
.search-btn {
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
color: var(--yk-blue);
cursor: pointer;
font-weight: bold;
}
.user-actions {
display: flex;
align-items: center;
gap: 20px;
}
.vip-btn {
background: linear-gradient(90deg, #e0b676, #c59a56);
color: #442e0d;
padding: 5px 15px;
border-radius: 15px;
font-size: 12px;
font-weight: bold;
cursor: pointer;
}
.avatar {
width: 32px;
height: 32px;
background: #555;
border-radius: 50%;
border: 2px solid transparent;
cursor: pointer;
}
/* --- Main Layout --- */
.container {
display: flex;
flex: 1;
max-width: 1600px; /* 宽屏适配 */
width: 100%;
margin: 0 auto;
padding-top: 20px;
}
/* Left: Video & Info */
.main-content {
flex: 1;
margin-right: 20px;
padding-left: 20px;
}
/* Right: Sidebar */
.sidebar {
width: 360px;
background-color: var(--yk-panel-bg);
border-radius: 8px 0 0 8px;
display: flex;
flex-direction: column;
padding: 20px;
height: calc(100vh - 80px); /* 充满高度 */
overflow-y: auto;
}
/* --- Video Player Area --- */
.player-container {
width: 100%;
aspect-ratio: 16/9;
background-color: #000;
position: relative;
border-radius: 4px;
overflow: hidden;
box-shadow: 0 10px 30px rgba(0,0,0,0.5);
group: player; /* For hovering */
}
/* 模拟视频背景 */
.video-bg {
width: 100%;
height: 100%;
background: linear-gradient(45deg, #111, #222);
display: flex;
justify-content: center;
align-items: center;
position: absolute;
top: 0;
left: 0;
}
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0