🗣 Wd提问: 风景网页设计源代码
🤖 Ai回答: 下面是一个简单的“风景”主题网页设计的 HTML + CSS 源代码示例。这个网页包含一个全屏背景图、标题、一段描述文字和几个风景图片的缩略图展示区,适合用于旅游、摄影或自然风光类网站。
✅ 风景网页设计源代码(HTML + CSS)
html
<!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
/* 全局样式重置 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Arial', sans-serif;
line-height: 1.6;
color: 333;
background-color: f4f4f4;
}
/* 全屏背景图区域 */
.hero {
height: 100vh;
background-image: url('https://source.unsplash.com/random/1920x1080/?nature,landscape');
background-size: cover;
background-position: center;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
color: white;
text-align: center;
position: relative;
}
.hero::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5); /* 半透明遮罩 */
z-index: 1;
}
.hero-content {
z-index: 2;
padding: 20px;
}
.hero h1 {
font-size: 3.5rem;
margin-bottom: 20px;
text-shadow: 2px 2px 5px rgba(0,0,0,0.7);
}
.hero p {
font-size: 1.5rem;
max-width: 800px;
text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}
/* 内容区域 */
.container {
max-width: 1200px;
margin: 40px auto;
padding: 20px;
text-align: center;
}
.gallery {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 20px;
margin-top: 30px;
}
.gallery img {
width: 100%;
height: 250px;
object-fit: cover;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
transition: transform 0.3s ease;
}
.gallery img:hover {
transform: scale(1.05);
}
footer {
background: 333;
color: white;
text-align: center;
padding: 20px 0;
margin-top: 40px;
}
</style
</head
<body
<! 英雄区域(全屏背景)
<section class=hero
<div class=hero-content
<h1探索自然之美</h1
<p从高山到大海,从森林到沙漠,世界充满令人惊叹的风景。</p
</div
</section
<! 图片画廊
<div class=container
<h2精选风景图集</h2
<div class=gallery
<img src=https://source.unsplash.com/random/600x400/?mountain alt=山脉
<img src=https://source.unsplash.com/random/600x400/?forest alt=森林
<img src=https://source.unsplash.com/random/600x400/?ocean alt=海洋
<img src=https://source.unsplash.com/random/600x400/?desert alt=沙漠
<img src=https://source.unsplash.com/random/600x400/?lake alt=湖泊
<img src=https://source.unsplash.com/random/600x400/?waterfall alt=瀑布
</div
</div
<! 页脚
<footer
<p© 2025 风景之美、保留所有权利。</p
</footer
</body
</html
🔍 功能说明:
全屏背景图:使用 `background-image` 和 Unsplash 的随机风景图。
响应式布局:使用 CSS Grid 实现自适应图片网格。
悬停动画:鼠标悬停时图片轻微放大。
半透明遮罩:提升文字可读性。
免费图片来源:使用 [Unsplash](https://unsplash.com) 的随机图(可用于演示,上线建议替换为本地或授权图片)。
🛠️ 使用建议:
1、将 `url(...)` 中的图片链接替换为你自己的高清风景图路径。
2、可添加 JavaScript 实现轮播图、灯箱效果等。
3、添加导航栏、按钮或联系表单可进一步丰富功能。
如果你需要加入 JavaScript 轮播图、响应式导航栏 或 移动端适配优化,也可以告诉我,我可以继续扩展这个模板。
📣 商家广告:





0
IP地址: 152.34.225.5
搜索次数: 1
提问时间: 2025-11-06 19:21:05
🛒 域名购买:
pjtf.cn
pai.pw
38.gold
kou.red
qn.gs
2223.com.cn
zhansou.cn
lh.gs
976.net.cn
dttt.com.cn
❓️ 热门提问:
机房里面有哪些设备
电商仓储托管公司
佛山机房托管
1g带宽的服务器
csgo私人服务器
live域名是哪国的
香港坐公交车怎么付钱
国外便宜的vps
VPS主机搭建性能监控操作
SEO工具网页版
豌豆Ai站群搜索引擎系统
🌐 域名评估:
q-u.com.cn
cqgzy.com
lyxk.cn
oppo.sc.cn
gwnd.cn
5a.tw.cn
deepseek.fans
n.com
musk.pink
emojiall.com
⛏ 最新挖掘:
凯里酸汤鱼
贵阳烤脑花
都匀毛尖茶
花溪牛肉粉
贵阳烤生蚝
贵阳烤豆腐
贵阳纸包鱼
贵阳特色菜
🖌 热门作画:
🤝 关于我们:
豌豆Ai
域名
建站
站群
留痕
推广
评估
源码
开发Ai
工具
日记
价格
加盟
广告
流量
留言
联系
🗨 加入群聊:
🔗 友情链接:
乐山网站优化公司
Sökmotor for barn
ai提问
🧰 站长工具:
Ai工具 whois查询 搜索
📢 温馨提示:本站所有问答由Ai自动创作,内容仅供参考,若有误差请用“联系”里面信息通知我们人工修改或删除。
👉 技术支持:本站由豌豆Ai提供技术支持,使用的最新版:《豌豆Ai站群搜索引擎系统 V.25.10.25》搭建本站。