以下是一个简单的HTML5网页代码,用于介绍一处旅游风景。该网页采用了苹果官网的设计风格和响应式布局。

<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>旅游风景介绍</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
	<header>
		<div class="logo">
			<img src="logo.png" alt="logo">
		</div>
		<nav>
			<ul>
				<li><a href="#">首页</a></li>
				<li><a href="#">景点介绍</a></li>
				<li><a href="#">游玩攻略</a></li>
				<li><a href="#">预订门票</a></li>
				<li><a href="#">联系我们</a></li>
			</ul>
		</nav>
	</header>
	<main>
		<section class="hero">
			<h1>探索美丽的旅游风景</h1>
			<p>欢迎来到我们的旅游景点,这里有美丽的自然风景、丰富的文化遗产和独特的民俗风情。</p>
			<button>了解更多</button>
		</section>
		<section class="features">
			<div class="feature">
				<img src="feature-1.jpg" alt="feature-1">
				<h2>美丽的自然景观</h2>
				<p>这里有壮观的山脉、清澈的湖泊、翠绿的森林和奇特的岩石地貌,让你沉浸在大自然的美丽中。</p>
			</div>
			<div class="feature">
				<img src="feature-2.jpg" alt="feature-2">
				<h2>丰富的文化遗产</h2>
				<p>这里有古老的建筑、传统的手工艺品和独特的民俗文化,让你感受到历史和文化的厚重。</p>
			</div>
			<div class="feature">
				<img src="feature-3.jpg" alt="feature-3">
				<h2>多彩的旅游活动</h2>
				<p>这里有刺激的户外运动、丰富的文化体验和美食探索,让你度过一个充满乐趣的假期。</p>
			</div>
		</section>
		<section class="gallery">
			<h2>探索旅游风景的美丽</h2>
			<div class="photos">
				<img src="photo-1.jpg" alt="photo-1">
				<img src="photo-2.jpg" alt="photo-2">
				<img src="photo-3.jpg" alt="photo-3">
				<img src="photo-4.jpg" alt="photo-4">
			</div>
		</section>
		<section class="contact">
			<h2>联系我们</h2>
			<form>
				<label for="name">姓名:</label>
				<input type="text" id="name" name="name" required>
				<label for="email">邮箱:</label>
				<input type="email" id="email" name="email" required>
				<label for="message">留言:</label>
				<textarea id="message" name="message" required></textarea>
				<button type="submit">发送</button>
			</form>
		</section>
	</main>
	<footer>
		<p>版权所有 © 2021 旅游风景介绍</p>
	</footer>
</body>
</html>

以下是该网页所使用的CSS样式表:

* {
	box-sizing: border-box;
}

body {
	font-family: "Helvetica Neue", sans-serif;
	font-size: 16px;
	line-height: 1.5;
	margin: 0;
	padding: 0;
}

header {
	background-color: #333;
	color: #fff;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	padding: 20px;
}

.logo img {
	height: 40px;
	width: auto;
}

nav ul {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
}

nav li {
	margin-right: 20px;
}

nav li:last-child {
	margin-right: 0;
}

nav a {
	color: #fff;
	text-decoration: none;
}

nav a:hover {
	color: #ccc;
}

main {
	margin: 20px;
}

.hero {
	background-image: url("hero.jpg");
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
	color: #fff;
	padding: 100px;
	text-align: center;
}

.hero h1 {
	font-size: 48px;
	margin: 0;
}

.hero p {
	font-size: 24px;
	margin: 20px 0;
}

.hero button {
	background-color: #fff;
	border: none;
	color: #333;
	cursor: pointer;
	font-size: 18px;
	padding: 10px 20px;
}

.hero button:hover {
	background-color: #ccc;
}

.features {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	margin: 40px 0;
}

.feature {
	flex-basis: calc(33.33% - 20px);
	margin-bottom: 20px;
	padding: 20px;
	text-align: center;
}

.feature img {
	height: 200px;
	width: auto;
}

.feature h2 {
	font-size: 24px;
	margin: 20px 0;
}

.feature p {
	font-size: 18px;
	line-height: 1.5;
	margin: 0;
}

.gallery {
	margin: 40px 0;
	text-align: center;
}

.gallery h2 {
	font-size: 24px;
	margin: 0 0 40px 0;
}

.photos {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	margin: 0 -10px;
}

.photos img {
	flex-basis: calc(25% - 20px);
	height: auto;
	margin: 10px;
	max-width: 100%;
}

.contact {
	background-color: #f9f9f9;
	padding: 40px;
	text-align: center;
}

.contact h2 {
	font-size: 24px;
	margin: 0 0 40px 0;
}

.contact form {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin: 0 auto;
	max-width: 600px;
}

.contact label {
	display: block;
	font-size: 18px;
	margin-bottom: 10px;
	text-align: left;
	width: 100%;
}

.contact input[type="text"],
.contact input[type="email"],
.contact textarea {
	border: 1px solid #ccc;
	border-radius: 5px;
	font-size: 18px;
	margin-bottom: 20px;
	padding: 10px;
	width: 100%;
}

.contact textarea {
	height: 150px;
}

.contact button[type="submit"] {
	background-color: #333;
	border: none;
	border-radius: 5px;
	color: #fff;
	cursor: pointer;
	font-size: 18px;
	padding: 10px 20px;
}

.contact button[type="submit"]:hover {
	background-color: #555;
	color: #fff;
}

footer {
	background-color: #333;
	color: #fff;
	padding: 20px;
	text-align: center;
}
你是一名中国大二在读生你的导师需要你根据苹果官网的设计风格制作一款介绍一处旅游风景的html5网页那么你会制作出什么样的网页来呢请将其代码展示给你的导师。

原文地址: https://www.cveoy.top/t/topic/bSDr 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录