css怎么让动画下过一直重复,CSS动画重复无需重新加载

我创建了一个带有背景图片的div,并将css动画应用到它(从左到右过渡)。 (附截图)enter image description here我的问题是:如何在无需重新加载页面的情况下再次播放它?这里是我的html:CSS动画重复无需重新加载

这里是我的CSS:

.chef {

background-image: url("../img/chef.png");

background-position: left bottom;

background-size: auto 100%;

position: absolute;

background-repeat: no-repeat;

width:700px;

height:60px;

margin-top:90px;

}

/动画厨师/

@-webkit-keyframes move

{

from {

left: 0;

}

to {

left: 50%;

}

}

@keyframes move

{

from {

left: 0;

}

to {

left: 50%;

}

to {

left: 100%;

}

}

.chef {

padding-right: 20px;

left: 100%;

position: absolute;

-webkit-animation: move 40s;

animation: move 40s;

}

.chef img {

-webkit-transition: all 10s ease-in-out;

-moz-transition: all 10s ease-in-out;

-o-transition: all 10s ease-in-out;

-ms-transition: all 10s ease-in-out;

border-radius:60px;

transition-duration: 10s;

}

2016-08-12

Liz H.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值