基本信息
源码名称:Animation动画实例(移动的星空)
源码大小:2.26M
文件格式:.rar
开发语言:CSS
更新时间:2018-10-30
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 1 元×
微信扫码支付:1 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
简单的Animation动画效果参考
@keyframes move-background { from { -webkit-transform: translate3d(0px, 0px, 0px); } to { -webkit-transform: translate3d(1000px, 0px, 0px); } } @-webkit-keyframes move-background { from { -webkit-transform: translate3d(0px, 0px, 0px); } to { -webkit-transform: translate3d(1000px, 0px, 0px); } } @-moz-keyframes move-background { from { -webkit-transform: translate3d(0px, 0px, 0px); } to { -webkit-transform: translate3d(1000px, 0px, 0px); } } @-webkit-keyframes move-background { from { -webkit-transform: translate3d(0px, 0px, 0px); } to { -webkit-transform: translate3d(1000px, 0px, 0px); } } .background-container{ position: fixed; top: 0; left:0; bottom: 0; right: 0; } .stars { background: black url(stars.png) repeat; position: absolute; top: 0; bottom: 0; left: 0; right: 0; display: block; z-index: 0; } .twinkling{ width:10000px; height: 100%; background: transparent url("twinkling.png") repeat; background-size: 1000px 1000px; position: absolute; right: 0; top: 0; bottom: 0; z-index: 2; -moz-animation:move-background 70s linear infinite; -ms-animation:move-background 70s linear infinite; -o-animation:move-background 70s linear infinite; -webkit-animation:move-background 70s linear infinite; animation:move-background 70s linear infinite; } .clouds{ width:10000px; height: 100%; background: transparent url("clouds_repeat.png") repeat; background-size: 1000px 1000px; position: absolute; right: 0; top: 0; bottom: 0; z-index: 3; -moz-animation:move-background 150s linear infinite; -ms-animation:move-background 150s linear infinite; -o-animation:move-background 150s linear infinite; -webkit-animation:move-background 150s linear infinite; animation:move-background 150s linear infinite; } img{ height: 70vh; width:70vh; position: absolute; z-index: 3; right: 20px; }