梦幻西游动画

最近学习了用css写动画,写了一个梦幻西游的动画
HTML代码

`

梦幻西游
`

CSS代码
*{
margin: 0;
padding: 0;
list-style: none;
}
.people{
position: absolute;
width: 950px;
left: 50%;
margin-left: -475px;
bottom: 100px;
}
.people>ul::after{
clear: both;
display: block;
content: “”;
}
.people>ul>li{
width: 200px;
height: 180px;
margin-right: 50px;
float: left;
overflow: hidden;
}
.people>ul>li:last-child{
margin-right: 0;
}
.people>ul>li>div{
width: 1600px;
height: 180px;
font-size: 0;
animation-name: dong;
animation-duration: 1s;
animation-iteration-count:infinite;
animation-timing-function: steps(8);
}
.people>ul>li>div>img{
width: 100%;
}

/定义动画/
@keyframes dong{
from{
margin-left: 0;
}
to{
margin-left: -1600px;
}
}

html,body,.main{
height: 100%;
}
.main{
position: relative;
width: 100%;
overflow: hidden;
}
.main>.background{
position: relative;
width: 3920px;
height: 100%;
background-image: url(’./images/bg.jpg’);
background-repeat: repeat-x;

animation-name: bg;
animation-duration: 30s;
animation-timing-function: linear;
animation-iteration-count: infinite;

}

@keyframes bg{
from{
left: -1920px;
}
to{
left: 0;
}
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值