微信公众号
手机网站
就业/招聘小程序
咨询电话: 010-66083178(工作日8:30-17:30) 请登录 注册
联系我们
联系人:王秀秀
010 -66083178
www.qxwq.org.cn 
北京市西城区广安门
内广义街5号广益大厦
大赛作品详情

作品名称:html5+css3动画
学校名称:邯郸冀南新区银河中等专业学校
参赛队伍:银河护卫8队
参赛学生:王利丹  
指导老师:王明飞 李松宁  

详细说明
城市动画来源于我们在生活当中从白天到黑夜<html>
<head>
<meta charset="UTF-8">
<title>HTML5+CSS3城市场景动画</title>
<style>
body {margin:0; padding:0; background-color:#ddf5f7;}
/*-------- 天空背景以及动画 --------*/
.stage {
    position: relative;
    overflow: hidden;
    height: 600px;
    background: #ddf5f7;
    animation: name2 10s ease infinite alternate;
}
@keyframes name2 {
    0%{
        background: #000033;
    }
    25%{
        background: #1689d9;
    }
    50%{
        background: #39545e;
    }
    75%{
        background: #BB9971;
    }
    100%{
        background: red;
    }
}

/*-------- 气球以及动画 --------*/
.balloon {
    position: absolute;
    z-index: 3;
    top: 5%;
    background: url(images/balloon.png) no-repeat no-repeat center;
    height: 227px;
    width: 157px;
    animation: name1 10s ease infinite alternate;
}

@keyframes name1 {
    0%{
        right: -100px;
        transform: rotate(0deg);
    }
    25%{
        right: 25%;
        transform: rotate(30deg);
    }
    50%{
        right: 50%;
        transform: rotate(60deg);
    }
    75%{
        right: 75%;
        transform: rotate(30deg);
    }
    100%{
        right: 100%;
        transform: rotate(0deg);
    }
}
/*-webikit , -o- ,-ms- , -moz-*/
@-o-keyframes name1 {
    0%{
        right: -100px;
        transform: rotate(0deg);
    }
    25%{
        right: 25%;
        transform: rotate(30deg);
    }
    50%{
        right: 50%;
        transform: rotate(60deg);
    }
    75%{
        right: 75%;
        transform: rotate(30deg);
    }
    100%{
        right: 100%;
        transform: rotate(0deg);
    }
}

/*-------- 城市场景图片 --------*/
.skyline {
    position: absolute;
    z-index: 5;
    width: 100%;
    bottom: 26%;
    background: url(images/skyline.png) repeat no-repeat;
    height: 147px;
}
.beans {
    position: absolute;
    z-index: 4;
    height: 201px;
    width: 88px;
    bottom: 30%;
    left: 50%;
    background: url(images/beans.png) no-repeat no-repeat;
}
.ground {
    position: absolute;
    width: 100%;
    bottom: 0;
}
.ground.front {
    z-index: 30;
    background: url(images/groundFront.png) repeat no-repeat center;
    height: 301px;
}
.ground.mid {
    z-index: 20;
    background: url(images/groundMid.png) repeat no-repeat;
    height: 299px;
}
.ground.back {
    z-index: 10;
    background: url(images/groundBack.png) repeat no-repeat center;
    height: 281px;
}
.dowEventCenter {
    position: absolute;
    z-index: 12;
    bottom: 20%;
    left: 5%;
    background: url(images/dowEventCenter.png) no-repeat no-repeat center;
    height: 236px;
    width: 524px;
}
.planetarium {
    position: absolute;
    z-index: 12;
    bottom: 18%;
    right: 10%;
    background: url(images/Planetarium.png) no-repeat no-repeat center;
    height: 285px;
    width: 347px;
}
.friendshipShell {
    position: absolute;
    z-index: 21;
    bottom: 18%;
    left: 20%;
    background: url(images/friendshipShell.png) no-repeat no-repeat center;
    height: 370px;
    width: 231px;
}
.glockenspiel {
    position: absolute;
    z-index: 11;
    bottom: 26%;
    right: 50%;
    background: url(images/Glockenspiel.png) no-repeat no-repeat center;
    height: 263px;
    width: 137px;
}

</style>
</head>
<body>

<section>
  <div class="stage">
    <div class="skyline"></div>
    <div class="beans"></div>
    <div class="ground back"></div>
    <div class="ground mid"></div>
    <div class="ground front"></div>
    <div class="dowEventCenter"></div>
    <div class="planetarium"></div>
    <div class="friendshipShell"></div>
    <div class="glockenspiel"></div>
    <!--汽球-->
    <div class="balloon"></div>
  </div>
</section>
</body>
</html>
找人才
千校人才小程序
找工作
万企岗位小程序
一键咨询
注册简历
查询
资料下载
返回顶部