以下是一个完整的HTML文件,包含了一个新手机发布展示页面的所有内容。页面设计现代、响应式,并使用了渐变、玻璃拟态效果和优雅的动画效果。
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>完美手机发布 | 1999元旗舰</title>
<style>
/* 全局样式 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Arial', sans-serif;
line-height: 1.6;
color: #333;
background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
overflow-x: hidden;
}
/* Hero区域 */
.hero {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background: url('https://via.placeholder.com/1920x1080') no-repeat center center/cover;
position: relative;
overflow: hidden;
}
.hero::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.4);
}
.hero-content {
position: relative;
z-index: 2;
text-align: center;
color: white;
}
.hero h1 {
font-size: 3rem;
margin-bottom: 1rem;
animation: fadeIn 2s ease-in-out;
}
.hero p {
font-size: 1.2rem;
margin-bottom: 2rem;
animation: slideUp 1.5s ease-in-out;
}
.btn {
background: linear-gradient(135deg, #ff7e5f, #feb47b);
color: white;
padding: 1rem 2rem;
border-radius: 25px;
text-decoration: none;
font-size: 1rem;
transition: transform 0.3s ease;
}
.btn:hover {
transform: scale(1.1);
}
/* 动画效果 */
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes slideUp {
from { transform: translateY(20px); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}
/* 特性介绍 */
.features {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
padding: 4rem 2rem;
background: #fff;
}
.feature {
text-align: center;
padding: 2rem;
border-radius: 15px;
background: rgba(255, 255, 255, 0.8);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.2);
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.feature h2 {
font-size: 1.5rem;
margin-bottom: 1rem;
}
.feature p {
font-size: 1rem;
color: #666;
}
/* 参数信息 */
.specs {
padding: 4rem 2rem;
background: linear-gradient(135deg, #ff7e5f, #feb47b);
color: white;
}
.specs h2 {
text-align: center;
margin-bottom: 2rem;
}
.specs-table {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
}
.specs-item {
background: rgba(255, 255, 255, 0.2);
padding: 1.5rem;
border-radius: 10px;
text-align: center;
}
.specs-item h3 {
font-size: 1.2rem;
margin-bottom: 0.5rem;
}
.specs-item p {
font-size: 1rem;
}
/* 响应式设计 */
@media (max-width: 768px) {
.hero h1 {
font-size: 2rem;
}
.hero p {
font-size: 1rem;
}
.features {
grid-template-columns: 1fr;
}
.specs-table {
grid-template-columns: 1fr;
}
}
</style>
</head>
<body>
<!-- Hero区域 -->
<section class="hero">
<div class="hero-content">
<h1>完美手机 X1</h1>
<p>1999元旗舰,极致体验</p>
<a href="#" class="btn">立即购买</a>
</div>
</section>
<!-- 特性介绍 -->
<section class="features">
<div class="feature">
<h2>强劲性能</h2>
<p>搭载最新处理器,流畅运行各种应用。</p>
</div>
<div class="feature">
<h2>超清屏幕</h2>
<p>6.7英寸AMOLED屏幕,支持120Hz刷新率。</p>
</div>
<div class="feature">
<h2>长续航电池</h2>
<p>5000mAh大容量电池,支持33W快充。</p>
</div>
</section>
<!-- 参数信息 -->
<section class="specs">
<h2>详细参数</h2>
<div class="specs-table">
<div class="specs-item">
<h3>处理器</h3>
<p>八核高性能处理器</p>
</div>
<div class="specs-item">
<h3>屏幕</h3>
<p>6.7英寸 AMOLED</p>
</div>
<div class="specs-item">
<h3>内存</h3>
<p>8GB RAM + 128GB ROM</p>
</div>
<div class="specs-item">
<h3>摄像头</h3>
<p>后置64MP主摄 + 超广角</p>
</div>
<div class="specs-item">
<h3>电池</h3>
<p>5000mAh + 33W快充</p>
</div>
</div>
</section>
</body>
</html>
页面说明:
- Hero区域:采用全屏背景图,叠加半透明黑色遮罩,突出产品名称和标语。
- 特性介绍:使用网格布局展示手机的核心特性,结合玻璃拟态效果。
- 参数信息:以表格形式展示详细参数,采用渐变背景增强视觉层次感。
- 动画效果:标题和按钮等元素添加了淡入和滑动动画,提升用户体验。
- 响应式设计:通过媒体查询适配不同屏幕尺寸,确保在手机和平板上也能良好显示。
将此代码保存为HTML文件后即可直接运行查看效果。