<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>光影世界 - 发现你的精彩电影</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" rel="stylesheet">
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#165DFF',
secondary: '#FF7D00',
dark: '#1D2129',
light: '#F2F3F5',
muted: '#86909C'
},
fontFamily: {
inter: ['Inter', 'system-ui', 'sans-serif'],
},
}
}
}
</script>
<style type="text/tailwindcss">
@layer utilities {
.content-auto {
content-visibility: auto;
}
.text-shadow {
text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.card-hover {
transition: all 0.3s ease;
}
.card-hover:hover {
transform: translateY(-8px);
}
.scrollbar-hide::-webkit-scrollbar {
display: none;
}
.scrollbar-hide {
-ms-overflow-style: none;
scrollbar-width: none;
}
}
</style>
</head>
<body class="bg-gray-50 font-inter text-dark">
<!-- 导航栏 -->
<header class="fixed top-0 left-0 right-0 bg-white shadow-sm z-50 transition-all duration-300" id="navbar">
<div class="container mx-auto px-4 py-3 flex items-center justify-between">
<!-- Logo -->
<a href="#" class="flex items-center space-x-2">
<span class="text-primary text-2xl"><i class="fa fa-film"></i></span>
<span class="font-bold text-xl text-primary">光影世界</span>
</a>
<!-- 搜索框 - 桌面版 -->
<div class="hidden md:flex items-center w-1/3">
<div class="relative w-full">
<input type="text" placeholder="搜索电影、演员或导演..."
class="w-full pl-10 pr-4 py-2 rounded-full border border-gray-200 focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary transition-all">
<span class="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400">
<i class="fa fa-search"></i>
</span>
</div>
</div>
<!-- 汉堡菜单按钮 - 移动版 -->
<button class="md:hidden text-gray-600 focus:outline-none" id="menuBtn">
<i class="fa fa-bars text-xl"></i>
</button>
</div>
<!-- 移动版搜索框 -->
<div class="md:hidden px-4 pb-3 hidden" id="mobileSearch">
<div class="relative">
<input type="text" placeholder="搜索电影、演员或导演..."
class="w-full pl-10 pr-4 py-2 rounded-full border border-gray-200 focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary">
<span class="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400">
<i class="fa fa-search"></i>
</span>
</div>
</div>
</header>
<!-- 主内容区 -->
<main class="container mx-auto pt-24 pb-12 px-4 md:px-6">
<div class="flex flex-col md:flex-row gap-6">
<!-- 左侧分类菜单 -->
<aside class="w-full md:w-64 shrink-0">
<div class="bg-white rounded-xl shadow-sm p-4 sticky top-24">
<h2 class="text-lg font-bold mb-4">电影分类</h2>
<ul class="space-y-1">
<li><a href="#" class="block py-2 px-3 rounded-lg bg-primary/10 text-primary font-medium">全部电影</a></li>
<li><a href="#" class="block py-2 px-3 rounded-lg hover:bg-gray-100 transition-colors">动作</a></li>
<li><a href="#" class="block py-2 px-3 rounded-lg hover:bg-gray-100 transition-colors">喜剧</a></li>
<li><a href="#" class="block py-2 px-3 rounded-lg hover:bg-gray-100 transition-colors">爱情</a></li>
<li><a href="#" class="block py-2 px-3 rounded-lg hover:bg-gray-100 transition-colors">科幻</a></li>
<li><a href="#" class="block py-2 px-3 rounded-lg hover:bg-gray-100 transition-colors">悬疑</a></li>
<li><a href="#" class="block py-2 px-3 rounded-lg hover:bg-gray-100 transition-colors">恐怖</a></li>
<li><a href="#" class="block py-2 px-3 rounded-lg hover:bg-gray-100 transition-colors">动画</a></li>
<li><a href="#" class="block py-2 px-3 rounded-lg hover:bg-gray-100 transition-colors">纪录片</a></li>
</ul>
<div class="mt-6">
<h2 class="text-lg font-bold mb-4">热门地区</h2>
<div class="flex flex-wrap gap-2">
<a href="#" class="px-3 py-1 rounded-full bg-gray-100 text-sm hover:bg-gray-200 transition-colors">中国大陆</a>
<a href="#" class="px-3 py-1 rounded-full bg-gray-100 text-sm hover:bg-gray-200 transition-colors">美国</a>
<a href="#" class="px-3 py-1 rounded-full bg-gray-100 text-sm hover:bg-gray-200 transition-colors">日本</a>
<a href="#" class="px-3 py-1 rounded-full bg-gray-100 text-sm hover:bg-gray-200 transition-colors">韩国</a>
<a href="#" class="px-3 py-1 rounded-full bg-gray-100 text-sm hover:bg-gray-200 transition-colors">英国</a>
</div>
</div>
</div>
</aside>
<!-- 右侧内容区 -->
<div class="flex-1">
<!-- 轮播图 -->
<div class="relative mb-8 rounded-xl overflow-hidden shadow-md" style="height: 200px; min-height: 200px;">
<div class="absolute inset-0 bg-gradient-to-r from-dark/70 to-transparent z-10"></div>
<img src="https://picsum.photos/1200/400?random=1" alt="热门电影海报" class="w-full h-full object-cover">
<div class="absolute bottom-0 left-0 right-0 p-4 md:p-6 z-20 text-white">
<span class="inline-block px-3 py-1 bg-secondary text-white text-sm font-medium rounded-full mb-2">科幻冒险</span>
<h3 class="text-xl md:text-2xl font-bold mb-1 text-shadow">星际穿越:无尽边界</h3>
<p class="text-sm md:text-base line-clamp-1 md:line-clamp-2 text-gray-100 text-shadow">
当太阳系面临崩溃,一支勇敢的探险队穿越虫洞,寻找人类新家园的故事。
</p>
</div>
<!-- 轮播控制按钮 -->
<button class="absolute left-4 top-1/2 transform -translate-y-1/2 bg-white/20 hover:bg-white/30 text-white rounded-full w-10 h-10 flex items-center justify-center backdrop-blur-sm transition-all z-30">
<i class="fa fa-chevron-left"></i>
</button>
<button class="absolute right-4 top-1/2 transform -translate-y-1/2 bg-white/20 hover:bg-white/30 text-white rounded-full w-10 h-10 flex items-center justify-center backdrop-blur-sm transition-all z-30">
<i class="fa fa-chevron-right"></i>
</button>
</div>
<!-- 电影列表标题 -->
<div class="flex justify-between items-center mb-6">
<h2 class="text-xl font-bold">热门电影</h2>
<div class="flex space-x-2">
<button class="px-3 py-1 text-sm rounded-lg bg-primary text-white">最新</button>
<button class="px-3 py-1 text-sm rounded-lg hover:bg-gray-100">热门</button>
<button class="px-3 py-1 text-sm rounded-lg hover:bg-gray-100">评分</button>
</div>
</div>
<!-- 电影卡片网格 -->
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4 md:gap-5">
<!-- 电影卡片 1 -->
<div class="bg-white rounded-xl overflow-hidden shadow-sm card-hover">
<div class="relative" style="height: 200px;">
<img src="https://picsum.photos/300/400?random=10" alt="电影海报" class="w-full h-full object-cover">
<span class="absolute top-2 left-2 bg-primary text-white text-xs font-medium px-2 py-1 rounded">动作</span>
<div class="absolute inset-0 bg-gradient-to-t from-dark/70 via-dark/20 to-transparent opacity-0 hover:opacity-100 transition-opacity flex items-end justify-center pb-4">
<button class="bg-white text-primary px-3 py-1 rounded-full text-sm font-medium">播放</button>
</div>
</div>
<div class="p-3">
<h3 class="font-medium text-sm line-clamp-1">极速追击:终极行动</h3>
<p class="text-xs text-gray-500 mt-1 line-clamp-2">国际特工团队追踪全球最危险的恐怖分子,一场惊心动魄的跨国追击。</p>
</div>
</div>
<!-- 电影卡片 2 -->
<div class="bg-white rounded-xl overflow-hidden shadow-sm card-hover">
<div class="relative" style="height: 200px;">
<img src="https://picsum.photos/300/400?random=11" alt="电影海报" class="w-full h-full object-cover">
<span class="absolute top-2 left-2 bg-secondary text-white text-xs font-medium px-2 py-1 rounded">喜剧</span>
<div class="absolute inset-0 bg-gradient-to-t from-dark/70 via-dark/20 to-transparent opacity-0 hover:opacity-100 transition-opacity flex items-end justify-center pb-4">
<button class="bg-white text-primary px-3 py-1 rounded-full text-sm font-medium">播放</button>
</div>
</div>
<div class="p-3">
<h3 class="font-medium text-sm line-clamp-1">乌龙兄弟闯江湖</h3>
<p class="text-xs text-gray-500 mt-1 line-clamp-2">两个平凡兄弟意外卷入一场国际阴谋,笑料百出的冒险就此展开。</p>
</div>
</div>
<!-- 电影卡片 3 -->
<div class="bg-white rounded-xl overflow-hidden shadow-sm card-hover">
<div class="relative" style="height: 200px;">
<img src="https://picsum.photos/300/400?random=12" alt="电影海报" class="w-full h-full object-cover">
<span class="absolute top-2 left-2 bg-green-500 text-white text-xs font-medium px-2 py-1 rounded">爱情</span>
<div class="absolute inset-0 bg-gradient-to-t from-dark/70 via-dark/20 to-transparent opacity-0 hover:opacity-100 transition-opacity flex items-end justify-center pb-4">
<button class="bg-white text-primary px-3 py-1 rounded-full text-sm font-medium">播放</button>
</div>
</div>
<div class="p-3">
<h3 class="font-medium text-sm line-clamp-1">爱在记忆消逝前</h3>
<p class="text-xs text-gray-500 mt-1 line-clamp-2">一对老年夫妇面对记忆衰退,共同寻找生命中最珍贵的回忆与爱情。</p>
</div>
</div>
<!-- 电影卡片 4 -->
<div class="bg-white rounded-xl overflow-hidden shadow-sm card-hover">
<div class="relative" style="height: 200px;">
<img src="https://picsum.photos/300/400?random=13" alt="电影海报" class="w-full h-full object-cover">
<span class="absolute top-2 left-2 bg-purple-500 text-white text-xs font-medium px-2 py-1 rounded">科幻</span>
<div class="absolute inset-0 bg-gradient-to-t from-dark/70 via-dark/20 to-transparent opacity-0 hover:opacity-100 transition-opacity flex items-end justify-center pb-4">
<button class="bg-white text-primary px-3 py-1 rounded-full text-sm font-medium">播放</button>
</div>
</div>
<div class="p-3">
<h3 class="font-medium text-sm line-clamp-1">未来城市:记忆裂痕</h3>
<p class="text-xs text-gray-500 mt-1 line-clamp-2">在高度发达的未来城市,一名侦探调查一起离奇案件,揭开了人类记忆的秘密。</p>
</div>
</div>
<!-- 电影卡片 5 -->
<div class="bg-white rounded-xl overflow-hidden shadow-sm card-hover">
<div class="relative" style="height: 200px;">
<img src="https://picsum.photos/300/400?random=14" alt="电影海报" class="w-full h-full object-cover">
<span class="absolute top-2 left-2 bg-red-500 text-white text-xs font-medium px-2 py-1 rounded">恐怖</span>
<div class="absolute inset-0 bg-gradient-to-t from-dark/70 via-dark/20 to-transparent opacity-0 hover:opacity-100 transition-opacity flex items-end justify-center pb-4">
<button class="bg-white text-primary px-3 py-1 rounded-full text-sm font-medium">播放</button>
</div>
</div>
<div class="p-3">
<h3 class="font-medium text-sm line-clamp-1">深夜凶铃:重启</h3>
<p class="text-xs text-gray-500 mt-1 line-clamp-2">一盘神秘的录像带,再次唤醒了沉睡多年的恐怖诅咒,无人能逃脱。</p>
</div>
</div>
<!-- 电影卡片 6 -->
<div class="bg-white rounded-xl overflow-hidden shadow-sm card-hover">
<div class="relative" style="height: 200px;">
<img src="https://picsum.photos/300/400?random=15" alt="电影海报" class="w-full h-full object-cover">
<span class="absolute top-2 left-2 bg-primary text-white text-xs font-medium px-2 py-1 rounded">动作</span>
<div class="absolute inset-0 bg-gradient-to-t from-dark/70 via-dark/20 to-transparent opacity-0 hover:opacity-100 transition-opacity flex items-end justify-center pb-4">
<button class="bg-white text-primary px-3 py-1 rounded-full text-sm font-medium">播放</button>
</div>
</div>
<div class="p-3">
<h3 class="font-medium text-sm line-clamp-1">刺客信条:血誓</h3>
<p class="text-xs text-gray-500 mt-1 line-clamp-2">一名现代刺客穿越时空,揭开古代秘密组织的阴谋,守护人类自由意志。</p>
</div>
</div>
<!-- 电影卡片 7 -->
<div class="bg-white rounded-xl overflow-hidden shadow-sm card-hover">
<div class="relative" style="height: 200px;">
<img src="https://picsum.photos/300/400?random=16" alt="电影海报" class="w-full h-full object-cover">
<span class="absolute top-2 left-2 bg-blue-400 text-white text-xs font-medium px-2 py-1 rounded">动画</span>
<div class="absolute inset-0 bg-gradient-to-t from-dark/70 via-dark/20 to-transparent opacity-0 hover:opacity-100 transition-opacity flex items-end justify-center pb-4">
<button class="bg-white text-primary px-3 py-1 rounded-full text-sm font-medium">播放</button>
</div>
</div>
<div class="p-3">
<h3 class="font-medium text-sm line-clamp-1">奇幻森林:精灵传说</h3>
<p class="text-xs text-gray-500 mt-1 line-clamp-2">一个人类女孩意外进入奇幻森林,与精灵族一起对抗黑暗势力的冒险故事。</p>
</div>
</div>
<!-- 电影卡片 8 -->
<div class="bg-white rounded-xl overflow-hidden shadow-sm card-hover">
<div class="relative" style="height: 200px;">
<img src="https://picsum.photos/300/400?random=17" alt="电影海报" class="w-full h-full object-cover">
<span class="absolute top-2 left-2 bg-amber-500 text-white text-xs font-medium px-2 py-1 rounded">悬疑</span>
<div class="absolute inset-0 bg-gradient-to-t from-dark/70 via-dark/20 to-transparent opacity-0 hover:opacity-100 transition-opacity flex items-end justify-center pb-4">
<button class="bg-white text-primary px-3 py-1 rounded-full text-sm font-medium">播放</button>
</div>
</div>
<div class="p-3">
<h3 class="font-medium text-sm line-clamp-1">消失的夜晚</h3>
<p class="text-xs text-gray-500 mt-1 line-clamp-2">一名侦探调查一起离奇失踪案,随着调查深入,发现所有线索都指向自己。</p>
</div>
</div>
<!-- 电影卡片 9 -->
<div class="bg-white rounded-xl overflow-hidden shadow-sm card-hover">
<div class="relative" style="height: 200px;">
<img src="https://picsum.photos/300/400?random=18" alt="电影海报" class="w-full h-full object-cover">
<span class="absolute top-2 left-2 bg-teal-500 text-white text-xs font-medium px-2 py-1 rounded">纪录片</span>
<div class="absolute inset-0 bg-gradient-to-t from-dark/70 via-dark/20 to-transparent opacity-0 hover:opacity-100 transition-opacity flex items-end justify-center pb-4">
<button class="bg-white text-primary px-3 py-1 rounded-full text-sm font-medium">播放</button>
</div>
</div>
<div class="p-3">
<h3 class="font-medium text-sm line-clamp-1">地球之声:自然启示</h3>
<p class="text-xs text-gray-500 mt-1 line-clamp-2">一部震撼人心的纪录片,记录了地球上最珍贵的自然景观和濒危物种。</p>
</div>
</div>
<!-- 电影卡片 10 -->
<div class="bg-white rounded-xl overflow-hidden shadow-sm card-hover">
<div class="relative" style="height: 200px;">
<img src="https://picsum.photos/300/400?random=19" alt="电影海报" class="w-full h-full object-cover">
<span class="absolute top-2 left-2 bg-secondary text-white text-xs font-medium px-2 py-1 rounded">喜剧</span>
<div class="absolute inset-0 bg-gradient-to-t from-dark/70 via-dark/20 to-transparent opacity-0 hover:opacity-100 transition-opacity flex items-end justify-center pb-4">
<button class="bg-white text-primary px-3 py-1 rounded-full text-sm font-medium">播放</button>
</div>
</div>
<div class="p-3">
<h3 class="font-medium text-sm line-clamp-1">办公室大作战</h3>
<p class="text-xs text-gray-500 mt-1 line-clamp-2">一家普通公司的员工们,在面临裁员危机时,如何用智慧和幽默化解困境。</p>
</div>
</div>
</div>
<!-- 加载更多按钮 -->
<div class="mt-8 text-center">
<button class="px-6 py-2 bg-white border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors text-sm font-medium">
加载更多 <i class="fa fa-chevron-down ml-1"></i>
</button>
</div>
</div>
</div>
</main>
<!-- 页脚 -->
<footer class="bg-dark text-white py-10">
<div class="container mx-auto px-4">
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
<div>
<div class="flex items-center space-x-2 mb-4">
<span class="text-primary text-2xl"><i class="fa fa-film"></i></span>
<span class="font-bold text-xl">光影世界</span>
</div>
<p class="text-gray-400 text-sm">发现精彩电影,感受光影魅力。我们提供最新、最热门的电影资源和资讯。</p>
<div class="mt-4 flex space-x-4">
<a href="#" class="text-gray-400 hover:text-primary transition-colors"><i class="fa-brands fa-weibo"></i></a>
<a href="#" class="text-gray-400 hover:text-primary transition-colors"><i class="fa-brands fa-wechat"></i></a>
<a href="#" class="text-gray-400 hover:text-primary transition-colors"><i class="fa-brands fa-twitter"></i></a>
<a href="#" class="text-gray-400 hover:text-primary transition-colors"><i class="fa-brands fa-instagram"></i></a>
</div>
</div>
<div>
<h3 class="font-bold text-lg mb-4">快速链接</h3>
<ul class="space-y-2 text-gray-400">
<li><a href="#" class="hover:text-primary transition-colors">首页</a></li>
<li><a href="#" class="hover:text-primary transition-colors">电影分类</a></li>
<li><a href="#" class="hover:text-primary transition-colors">热门榜单</a></li>
<li><a href="#" class="hover:text-primary transition-colors">最新上映</a></li>
<li><a href="#" class="hover:text-primary transition-colors">即将上映</a></li>
</ul>
</div>
<div>
<h3 class="font-bold text-lg mb-4">帮助中心</h3>
<ul class="space-y-2 text-gray-400">
<li><a href="#" class="hover:text-primary transition-colors">常见问题</a></li>
<li><a href="#" class="hover:text-primary transition-colors">联系我们</a></li>
<li><a href="#" class="hover:text-primary transition-colors">隐私政策</a></li>
<li><a href="#" class="hover:text-primary transition-colors">使用条款</a></li>
<li><a href="#" class="hover:text-primary transition-colors">意见反馈</a></li>
</ul>
</div>
<div>
<h3 class="font-bold text-lg mb-4">订阅最新资讯</h3>
<p class="text-gray-400 text-sm mb-4">订阅我们的电子邮件,获取最新电影资讯和独家优惠。</p>
<div class="flex">
<input type="email" placeholder="您的邮箱地址" class="px-4 py-2 rounded-l-lg w-full focus:outline-none focus:ring-2 focus:ring-primary/30 text-dark">
<button class="bg-primary hover:bg-primary/90 px-4 py-2 rounded-r-lg transition-colors">
<i class="fa fa-paper-plane"></i>
</button>
</div>
</div>
</div>
<div class="border-t border-gray-700 mt-8 pt-8 text-center text-gray-500 text-sm">
<p>© 2025 光影世界. 保留所有权利.</p>
</div>
</div>
</footer>
<!-- JavaScript -->
<script>
// 导航栏滚动效果
window.addEventListener('scroll', function() {
const navbar = document.getElementById('navbar');
if (window.scrollY > 50) {
navbar.classList.add('py-2', 'shadow');
navbar.classList.remove('py-3');
} else {
navbar.classList.add('py-3');
navbar.classList.remove('py-2', 'shadow');
}
});
// 汉堡菜单切换
document.getElementById('menuBtn').addEventListener('click', function() {
const mobileSearch = document.getElementById('mobileSearch');
mobileSearch.classList.toggle('hidden');
});
// 电影卡片悬停效果
const cards = document.querySelectorAll('.card-hover');
cards.forEach(card => {
card.addEventListener('mouseenter', function() {
this.querySelector('button').classList.add('scale-110');
});
card.addEventListener('mouseleave', function() {
this.querySelector('button').classList.remove('scale-110');
});
});
// 轮播图功能(简化版)
let currentSlide = 0;
const slides = [
{
image: 'https://picsum.photos/1200/400?random=1',
title: '星际穿越:无尽边界',
category: '科幻冒险',
description: '当太阳系面临崩溃,一支勇敢的探险队穿越虫洞,寻找人类新家园的故事。'
},
{
image: 'https://picsum.photos/1200/400?random=2',
title: '爱在春天里',
category: '爱情浪漫',
description: '两个陌生人在春天的巴黎相遇,一段跨越文化和语言的爱情故事。'
},
{
image: 'https://picsum.photos/1200/400?random=3',
title: '致命追击',
category: '动作惊悚',
description: '一名前特工必须保护一个关键证人,同时躲避追杀他的职业杀手。'
}
];
function updateSlide() {
const slide = slides[currentSlide];
const carousel = document.querySelector('.relative.mb-8');
// 更新背景图
carousel.querySelector('img').src = slide.image;
// 更新内容
carousel.querySelector('span').textContent = slide.category;
carousel.querySelector('h3').textContent = slide.title;
carousel.querySelector('p').textContent = slide.description;
}
// 轮播图左右按钮
document.querySelectorAll('.absolute.left-4, .absolute.right-4').forEach((button, index) => {
button.addEventListener('click', function() {
if (index === 0) { // 左按钮
currentSlide = (currentSlide - 1 + slides.length) % slides.length;
} else { // 右按钮
currentSlide = (currentSlide + 1) % slides.length;
}
updateSlide();
});
});
// 自动轮播
setInterval(() => {
currentSlide = (currentSlide + 1) % slides.length;
updateSlide();
}, 5000);
</script>
</body>
</html>
01-12
01-20