🗣 Wd提问: 油管视频下载器网页
🤖 Ai回答:
油管视频下载器网页设计
我将设计一个简洁实用的YouTube视频下载器界面,包含URL输入、格式选择和下载功能。
设计思路
简洁现代的界面
响应式设计适配不同设备
直观的操作流程
模拟下载过程(注意:实际下载功能需要后端支持)
实现代码
html
<!DOCTYPE html
<html lang=zh-CN
<head
<meta charset=UTF-8
<meta name=viewport content=width=device-width, initial-scale=1.0
<titleYT视频下载助手</title
<style
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background: linear-gradient(135deg, f5f7fa 0%, c3cfe2 100%);
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
padding: 20px;
}
.container {
background-color: white;
border-radius: 12px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
width: 100%;
max-width: 500px;
padding: 30px;
text-align: center;
}
.logo {
color: ff0000;
font-size: 28px;
font-weight: bold;
margin-bottom: 20px;
display: flex;
align-items: center;
justify-content: center;
}
.logo i {
margin-right: 10px;
font-size: 32px;
}
h1 {
color: 333;
margin-bottom: 10px;
font-size: 24px;
}
.description {
color: 666;
margin-bottom: 25px;
line-height: 1.5;
}
.input-group {
margin-bottom: 20px;
}
input[type=url] {
width: 100%;
padding: 15px;
border: 1px solid ddd;
border-radius: 6px;
font-size: 16px;
transition: border-color 0.3s;
}
input[type=url]:focus {
border-color: ff0000;
outline: none;
}
.format-options {
display: flex;
justify-content: space-between;
margin-bottom: 25px;
}
.format-option {
flex: 1;
margin: 0 5px;
padding: 12px;
border: 2px solid eee;
border-radius: 6px;
cursor: pointer;
transition: all 0.3s;
}
.format-option:hover {
border-color: ff0000;
}
.format-option.selected {
border-color: ff0000;
background-color: rgba(255, 0, 0, 0.05);
}
.format-option i {
font-size: 20px;
margin-bottom: 5px;
display: block;
color: 555;
}
.download-btn {
background-color: ff0000;
color: white;
border: none;
padding: 15px 25px;
border-radius: 6px;
font-size: 16px;
cursor: pointer;
width: 100%;
transition: background-color 0.3s;
font-weight: bold;
}
.download-btn:hover {
background-color: e50000;
}
.download-btn:disabled {
background-color: cccccc;
cursor: not-allowed;
}
.progress-container {
margin-top: 20px;
display: none;
}
.progress-bar {
height: 10px;
background-color: f0f0f0;
border-radius: 5px;
overflow: hidden;
}
.progress {
height: 100%;
background-color: ff0000;
width: 0%;
transition: width 0.3s;
}
.status {
margin-top: 10px;
font-size: 14px;
color: 666;
}
.footer {
margin-top: 30px;
color: 999;
font-size: 12px;
}
@media (max-width: 600px) {
.format-options {
flex-direction: column;
}
.format-option {
margin: 5px 0;
}
}
</style
<link rel=stylesheet href=https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css
</head
<body
<div class=container
<div class=logo
<i class=fab fa-youtube</i YT下载助手
</div
<h1YouTube视频下载器</h1
<p class=description粘贴YouTube视频链接,选择格式,然后下载到您的设备</p
<div class=input-group
<input type=url id=video-url placeholder=https://www.youtube.com/watch?v=... autocomplete=off
</div
<div class=format-options
<div class=format-option selected data-format=mp4
<i class=fas fa-film</i
<spanMP4 (视频)</span
</div
<div class=format-option data-format=mp3
<i class=fas fa-music</i
<spanMP3 (音频)</span
</div
<div class=format-option data-format=hd
<i class=fas fa-hd-video</i
<span高清 MP4</span
</div
</div
<button id=download-btn class=download-btn disabled
<i class=fas fa-download</i 下载
</button
<div class=progress-container id=progress-container
<div class=progress-bar
<div class=progress id=progress</div
</div
<div class=status id=status准备中...</div
</div
<div class=footer
注意:下载YouTube视频仅供个人使用,请遵守YouTube的服务条款
</div
</div
<script
document.addEventListener('DOMContentLoaded', function() {
const videoUrlInput = document.getElementById('video-url');
const formatOptions = document.querySelectorAll('.format-option');
const downloadBtn = document.getElementById('download-btn');
const progressContainer = document.getElementById('progress-container');
const progressBar = document.getElementById('progress');
const statusText = document.getElementById('status');
let selectedFormat = 'mp4';
// 输入框验证
videoUrlInput.addEventListener('input', function() {
const isValidUrl = this.value.trim() !== '' &&
(this.value.includes('youtube.com/') this.value.includes('youtu.be/'));
downloadBtn.disabled = !isValidUrl;
});
// 格式选择
formatOptions.forEach(option = {
option.addEventListener('click', function() {
formatOptions.forEach(opt = opt.classList.remove('selected'));
this.classList.add('selected');
selectedFormat = this.getAttribute('data-format');
});
});
// 下载按钮点击事件
downloadBtn.addEventListener('click', function() {
const videoUrl = videoUrlInput.value.trim();
if (!videoUrl) return;
// 显示进度条
progressContainer.style.display = 'block';
downloadBtn.disabled = true;
// 模拟下载过程
simulateDownload();
});
// 模拟下载过程
function simulateDownload() {
let progress = 0;
statusText.textContent = 正在解析视频...;
const interval = setInterval(() = {
progress += Math.random() * 10;
if (progress 100) progress = 100;
progressBar.style.width = progress + '%';
if (progress < 30) {
statusText.textContent = 正在解析视频...;
} else if (progress < 60) {
statusText.textContent = 正在准备下载...;
} else if (progress < 90) {
statusText.textContent = 下载中..、 + Math.floor(progress) + %;
} else if (progress < 100) {
statusText.textContent = 几乎完成..、 + Math.floor(progress) + %;
} else {
statusText.textContent = 下载完成!;
clearInterval(interval);
// 重置按钮状态
setTimeout(() = {
downloadBtn.disabled = false;
progressContainer.style.display = 'none';
progressBar.style.width = '0%';
alert('下载完成!在实际应用中,文件将开始下载。\n\n格式: ' + selectedFormat.toUpperCase());
}, 1000);
}
}, 200);
}
});
</script
</body
</html
功能说明
1、用户界面:
简洁的卡片式设计
YouTube品牌红色调
响应式布局,适配移动设备
2、核心功能:
URL输入验证(检查是否为YouTube链接)
格式选择(MP4视频、MP3音频、高清MP4)
下载进度模拟
完成状态提示
3、注意事项:
此界面仅为前端演示,实际下载功能需要后端服务支持
页面中包含免责声明,提醒用户遵守YouTube服务条款
这个设计注重用户体验,提供了清晰的视觉反馈和直观的操作流程。
0
IP地址: 216.26.250.152
搜索次数: 0
提问时间: 2025-09-09 20:24:54
❓ 热门提问:
推特账号共享2023
注册steam账号
外贸跟单员的职责
油管下载地址
购买推特号的意义
DASH是什么简称
亚马逊怎么换区
doge怎么发音啊
油管梯子软件哪个好用
推特苹果手机下载
📢 温馨提示:本站所有问答由Ai自动创作,内容仅供参考,若有误差请用“联系”里面信息通知我们人工修改或删除。
👉 技术支持:本站由JJ加速器提供技术支持,使用的最新版:《JJ加速器Ai问答系统 V.25.09.02》搭建本站。