css3中animation可以同时加载2个动画吗?

请问如何给一个div加载2个动画用css3

holdtom
浏览 10331回答 2
2回答

繁花如伊

<img&nbsp;src="1.png"&nbsp;class="a1"&nbsp;/>第一一秒的透明度动画,第二是延迟一秒的一秒循环位移动画&nbsp; &nbsp; .a1 {&nbsp; &nbsp; &nbsp; &nbsp; animation: a1 1s,a2 1s infinite 1s;&nbsp; &nbsp; }&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; @keyframes a1 {&nbsp; &nbsp; &nbsp; &nbsp; 0% {&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; opacity: 0;&nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp; &nbsp; &nbsp; 100% {&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; opacity: 1;&nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp; }&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; @keyframes a2 {&nbsp; &nbsp; &nbsp; &nbsp; 0% {&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; transform: translateY(0);&nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp; &nbsp; &nbsp; 50% {&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; transform: translateY(-20%);&nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp; &nbsp; &nbsp; 100% {&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; transform: translateY(0);&nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp; }
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

CSS3