请写一个相似于好客山东网首页的html页面,包含多种样式、布局、动效、排列,色彩鲜明,风格简洁大气、明亮华丽。请给出完整代码
时间: 2023-05-27 07:02:43 浏览: 157
前端课程设计-好客山东欢迎您(山东省简介).zip
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>好客山东网</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* header */
header {
background-color: #0169A9;
color: #fff;
padding: 10px 20px;
display: flex;
justify-content: space-between;
align-items: center;
}
header .logo {
font-size: 28px;
font-weight: bold;
}
header .nav a {
color: #fff;
margin-right: 20px;
text-decoration: none;
font-size: 18px;
}
.banner {
background-image: url(https://picsum.photos/1200/300);
height: 300px;
background-size: cover;
display: flex;
align-items: center;
justify-content: center;
}
.banner h1 {
color: #fff;
text-shadow: 2px 2px #000;
font-size: 48px;
font-weight: bold;
text-align: center;
}
/* container */
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
.row {
display: flex;
justify-content: space-between;
margin-bottom: 40px;
}
.card {
background-color: #fff;
box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
width: 30%;
padding: 20px;
text-align: center;
}
.card img {
width: 80%;
margin-bottom: 20px;
}
/* section */
section {
margin: 40px 0;
background-color: #F8F8F8;
padding: 40px;
display: flex;
justify-content: space-between;
align-items: center;
}
section h2 {
font-size: 36px;
font-weight: bold;
margin-bottom: 20px;
}
section p {
font-size: 18px;
line-height: 1.5;
margin-bottom: 20px;
}
section .btn {
background-color: #0169A9;
color: #fff;
padding: 10px 20px;
text-decoration: none;
font-size: 16px;
border-radius: 5px;
}
/* footer */
footer {
background-color: #333;
color: #fff;
padding: 20px;
display: flex;
justify-content: space-between;
align-items: center;
}
footer p {
font-size: 16px;
line-height: 1.5;
}
footer .social a {
color: #fff;
margin-right: 20px;
text-decoration: none;
font-size: 24px;
}
@media screen and (max-width: 768px) {
.row {
display: block;
}
.card {
width: 100%;
margin-bottom: 20px;
}
section {
flex-direction: column;
}
}
</style>
</head>
<body>
<!-- header -->
<header>
<div class="logo">好客山东网</div>
<div class="nav">
<a href="#">首页</a>
<a href="#">资讯</a>
<a href="#">美食</a>
<a href="#">旅游</a>
<a href="#">关于我们</a>
</div>
</header>
<!-- banner -->
<div class="banner">
<h1>山东,我的家园</h1>
</div>
<!-- container -->
<div class="container">
<div class="row">
<div class="card">
<img src="https://picsum.photos/200" alt="">
<h3>美食资讯</h3>
<p>探索山东的美食文化,品尝各种美味佳肴。</p>
<a href="#" class="btn">更多资讯</a>
</div>
<div class="card">
<img src="https://picsum.photos/200" alt="">
<h3>旅游攻略</h3>
<p>了解山东的旅游景点,规划完美旅程。</p>
<a href="#" class="btn">更多资讯</a>
</div>
<div class="card">
<img src="https://picsum.photos/200" alt="">
<h3>生活服务</h3>
<p>提供山东各类生活服务信息,让你生活更便捷。</p>
<a href="#" class="btn">更多资讯</a>
</div>
</div>
<section>
<div>
<h2>探索山东,发现美好</h2>
<p>山东是一个文化底蕴深厚、风景秀丽、旅游资源丰富的省份。这里有历史名城、世界遗产,还有美食、美景、美人,让人流连忘返。</p>
<a href="#" class="btn">了解更多</a>
</div>
<img src="https://picsum.photos/500" alt="">
</section>
</div>
<!-- footer -->
<footer>
<p>好客山东网 © 2020</p>
<div class="social">
<a href="#"><i class="fab fa-facebook-f"></i></a>
<a href="#"><i class="fab fa-twitter"></i></a>
<a href="#"><i class="fab fa-instagram"></i></a>
</div>
</footer>
</body>
</html>
阅读全文