如何让css3动画做到顺序展示

html-css013

如何让css3动画做到顺序展示,第1张

您好,代码如下:

<!doctype html>

<html>

<head>

<meta charset="utf-8">

<title>无标题文档</title>

<style type="text/css">

*{padding:0margin:0border:0}

.left{width:50%float:left

animation:myfirst 5s

-moz-animation:myfirst 5s/* Firefox */

-webkit-animation:myfirst 5s/* Safari and Chrome */

-o-animation:myfirst 5s/* Opera */

}

.right{width:50%float:left

animation:myfirst 5s

-moz-animation:myfirst 5s/* Firefox */

-webkit-animation:myfirst 5s/* Safari and Chrome */

-o-animation:myfirst 5s/* Opera */

animation-delay: 5s/* W3C 和 Opera */

-moz-animation-delay: 5s/* Firefox */

-webkit-animation-delay: 5s/* Safari 和 Chrome */

}

@keyframes myfirst

{

0% { opacity:0}

100% { opacity:1}

}

@-moz-keyframes myfirst /* Firefox */

{

0% { opacity:0}

100% { opacity:1}

}

@-webkit-keyframes myfirst /* Safari 和 Chrome */

{

0% { opacity:0}

100% { opacity:1}

}

@-o-keyframes myfirst /* Opera */

{

0% { opacity:0}

100% { opacity:}

</style>

</head>

<body>

<div>

<div class="left"><img src="images/xxx.jpg"></div>

<div class="right">文字XX </div>

</div>

</body>

</html>

css的执行方法是设置延迟函数

第一个设置1s

 transition-duration:1s

第二个设置第一个执行完成的函数时间假设第一个需要5s+开始时间1s

 transition-duration:6s

jq就用回调函数