How to make Butterfly Dance Animation by CSS3
This article mainly shows you "CSS3 how to make butterfly dance animation", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "CSS3 how to make butterfly dance animation" this article.
CSS3 makes butterfly flying animation body {background-color: lightblue;} # container {perspective: 600pxscape perspectiveorigin:-20% width: 850pxpolitical height: 566pxleft: 300pxscape top: gray;margin: 0px auto;} # butterfly {transform: rotateZ (- 30deg) rotate3d (0,1,0, 0deg) scale3d (0.5,0.5,0.5); transform-origin: 51% left: 0pxscape top: 0pxscape top: Width: 400pxposition height: 238pxtransf style: preserve-3d;/*Fly in a loop below*//*animation-name: butterflyani;animation-duration: 5sposition animationwhichle count: infinite;animation-timing-function: linear;*/} .wing {transform: rotateX (30deg) translate3d (- 200px, 0px, 0px) rotate3d (0,1,0, 160deg); transform-origin: top right;position: absolute;left: 200pxscape top: 0pxscape width: 200pxposition height: 238pxscape background: url (butterfly.png) no-repeat Animation-name: rightwingani;animation-duration: 0.6 rotate3d delay: 2s from {transform:rotateX (30deg) translate3d (- 200px, 0px, 0px) rotate3d (0,1,0, 160deg) } 50% {transform:rotateX (30deg) translate3d (- 200px, 0px, 0px) rotate3d (0,1,0, 100deg);} to {transform:rotateX (30deg) translate3d (- 200px, 0px, 0px) rotate3d (0,1,0, 160deg) } @ keyframes leftwingani {from {transform:rotateX (30deg) rotate3d (0,1,0, 0deg);} 50% {transform:rotateX (30deg) rotate3d (0,1,0, 80deg);} to {transform:rotateX (30deg) rotate3d (0,1,0, 00deg) } a {font-size: 5.5em; font-family: Arial; text-decoration: none; text-align: right; color: teal; letter-spacing:-2px; position: relative; top:-70%; left:-9%; width: 67%; display: block; line-height: 1.1em } these are all the contents of the article "how to make Butterfly Dance Animation in CSS3". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!