用网页画一个车载播放器的界面,请给出一个完整的页面代码,要求播放器的分辨率为1024*600
时间: 2024-05-19 16:13:48 浏览: 107
一个播放器页面
<!DOCTYPE html>
<html>
<head>
<title>车载播放器</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
margin: 0;
padding: 0;
background-color: #f2f2f2;
font-family: Arial, sans-serif;
}
.container {
width: 1024px;
height: 600px;
margin: 0 auto;
background-color: #fff;
box-shadow: 0 0 10px rgba(0,0,0,0.2);
}
.header {
height: 80px;
background-color: #333;
color: #fff;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20px;
}
.logo {
font-size: 28px;
font-weight: bold;
text-transform: uppercase;
}
.menu {
display: flex;
align-items: center;
font-size: 18px;
font-weight: bold;
text-transform: uppercase;
list-style: none;
margin: 0;
padding: 0;
}
.menu li {
margin-left: 20px;
cursor: pointer;
transition: all 0.3s ease;
}
.menu li:hover {
color: #f2f2f2;
}
.content {
display: flex;
height: 420px;
padding: 20px;
}
.sidebar {
width: 200px;
height: 100%;
background-color: #f2f2f2;
padding: 20px;
box-sizing: border-box;
}
.sidebar h2 {
font-size: 22px;
font-weight: bold;
margin-top: 0;
margin-bottom: 20px;
}
.sidebar ul {
list-style: none;
margin: 0;
padding: 0;
}
.sidebar li {
margin-bottom: 10px;
cursor: pointer;
transition: all 0.3s ease;
}
.sidebar li:hover {
color: #333;
}
.main {
flex: 1;
height: 100%;
background-color: #fff;
padding: 20px;
box-sizing: border-box;
}
.main h2 {
font-size: 22px;
font-weight: bold;
margin-top: 0;
margin-bottom: 20px;
}
.main video {
width: 100%;
height: 300px;
object-fit: cover;
margin-bottom: 20px;
}
.main .controls {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 20px;
}
.main .controls button {
background-color: #333;
color: #fff;
border: none;
padding: 10px 20px;
cursor: pointer;
font-size: 16px;
font-weight: bold;
text-transform: uppercase;
transition: all 0.3s ease;
}
.main .controls button:hover {
background-color: #f2f2f2;
color: #333;
}
.main .controls input[type="range"] {
-webkit-appearance: none;
width: 100%;
height: 5px;
background-color: #ccc;
border-radius: 2.5px;
outline: none;
margin: 0 10px;
}
.main .controls input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
width: 20px;
height: 20px;
background-color: #333;
border-radius: 50%;
cursor: pointer;
}
.main .controls input[type="range"]::-moz-range-thumb {
width: 20px;
height: 20px;
background-color: #333;
border-radius: 50%;
cursor: pointer;
}
.footer {
height: 80px;
background-color: #333;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
font-weight: bold;
text-transform: uppercase;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<div class="logo">车载播放器</div>
<ul class="menu">
<li>首页</li>
<li>视频</li>
<li>音乐</li>
<li>设置</li>
</ul>
</div>
<div class="content">
<div class="sidebar">
<h2>播放列表</h2>
<ul>
<li>视频1</li>
<li>视频2</li>
<li>视频3</li>
<li>视频4</li>
<li>视频5</li>
</ul>
</div>
<div class="main">
<h2>视频标题</h2>
<video controls>
<source src="video.mp4" type="video/mp4">
</video>
<div class="controls">
<button>播放</button>
<input type="range" min="0" max="100" value="0">
<button>全屏</button>
</div>
</div>
</div>
<div class="footer">版权所有 © 车载播放器</div>
</div>
</body>
</html>
阅读全文