<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>活力广东</title>
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="http://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<script src="http://cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="active.css"/>
</head>
<body>
<!-- 背景图 -->
<img id="bg" src="img/bg.png" alt="">
<!-- 头部logo及标题 -->
<header>
<img src="img/logo.png" alt="">
<h1>广东旅游欢迎您</h1>
</header>
<!-- 主体图及动画效果 -->
<section>
<div class="fl">
<img src="img/visit.png" alt="">
<img src="img/contract.png" alt="" class="dh1">
<img src="img/admin.png" alt="" class="dh1">
<img src="img/guide.png" alt="" class="dh2">
<img src="img/expo.png" alt="" class="dh2">
<img src="img/axam.png" alt="" class="dh1">
</div>
<div class="fr clear">
<img src="img/sjzx.png" alt="" class="dh1">
<img src="img/sina.png" alt="" class="dh1">
<img src="img/hall.png" alt="" class="dh1">
<img src="img/tencent.png" alt="" class="dh1">
<img src="img/traval.png" alt="" class="dh2">
<img src="img/weico.png" alt="" class="dh2">
</div>
</section>
<!-- 尾部版权 -->
<footer>
<div>
<img src="img/serial.png" alt="">
</div>
</footer>
</body>
</html>
*{
margin: 0 auto;
padding: 0 auto;
}
/*背景图响应式*/
@media screen and (min- 1400px) {
#bg{
100%;
height: 100%;
position: fixed;
}
}
@media screen and (max- 1400px) and (min- 600px) {
#bg{
100%;
height: 85%;
position: fixed;
}
}
@media screen and (max- 600px) {
#bg{
100%;
height: 100%;
position: fixed;
}
}
/*整体内容响应式*/
@media screen and (max- 600px) {
header{
80%;
position: relative;
padding-top: 60px;
}
header img{
17%;
height: 45px;
position: relative;
}
header h1{
font-size: 2rem;
position: relative;
color: white;
top: -10px;
}
section{
80%;
margin: 0 auto;
position: relative;
overflow: hidden;
top: 0;
}
section img{
height: 104px;
}
section .fl{
100%;
float: left;
}
.fl img:nth-child(2n-1){
62%;
}
.fl img:nth-child(2n){
34%;
}
section .fr{
100%;
float: right;
}
.fr img:nth-child(2n-1){
34%;
}
.fr img:nth-child(2n){
62%;
}
footer{
80%;
margin: 0 auto;
position: relative;
top: 50px;
}
footer img{
96%;
}
}
@media screen and (min- 600px) {
header{
1092px;
padding-top: 100px;
position: relative;
margin: 0 auto;
height: 56px;
}
header h1{
position: relative;
color: white;
left: 107px;
top: -60px;
}
section{
892px;
position: relative;
margin: auto;
margin-top: 56px;
overflow: hidden;
}
.fl{
446px;
float: left;
}
.fr{
446px;
float: right;
}
.fr img:nth-child(2n-1){
162px;
height: 139px;
}
.fr img:nth-child(2n){
278px;
height: 139px;
}
footer{
464px;
margin: 0 auto;
position: relative;
top: 150px;
}
}
/*动画效果*/
section img:hover{
animation: wendy 0.6s linear;
}
@keyframes wendy{
0%{
transform: translateY(0);
}
25%{
transform: translateY(-40px);
}
50%{
transform: translateY(0);
}
75%{
transform: translateY(-20px);
}
100%{
transform: translateY(0px);
}
}
.dh1{
animation: d1 0.5s linear;
}
@keyframes d1{
0%{
transform: scale(1.1,1.1);
}
25%{
transform: scale(0.9,0.9);
}
50%{
transform: scale(1.1,1.1);
}
75%{
transform: scale(0.9,0.9);
}
100%{
transform: scale(1,1);
}
}
.dh2{
animation: d2 0.5s linear;
}
@keyframes d2{
0%{
transform: translateX(10px);
}
25%{
transform: translateX(-10px);
}
50%{
transform: translateX(10px);
}
75%{
transform: translateX(-10px);
}
100%{
transform: translateX(0px);
}
}