Home >Web Front-end >Front-end Q&A >Does css3 animation effect have deformation?
The animation effect in css3 has deformation; you can use "animation: animation attribute @keyframes ..{..{transform: deformation attribute}}" to achieve deformation animation effect. The animation attribute is used to set animation style, transform Properties are used to set the deformation style.
The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.
css3 animation effect has deformation
Deformation can use the transform attribute in css. The transform attribute applies 2D to the element. or 3D conversion. This property allows us to rotate, scale, move or tilt the element.
You can use the animation attribute to set animation. This attribute is an abbreviated attribute that can be set:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> <style> .div1{ width:100px; height:100px; background:pink; margin:0 auto; animation:fadenum 5s; } @keyframes fadenum{ 100%{transform:rotate(180deg) scale(0.5,0.5);} } </style> </head> <body> <div class="div1">这是一个旋转缩放的效果</div> </body> </html>Output result: (Learning video sharing:
css video Tutorial)
The above is the detailed content of Does css3 animation effect have deformation?. For more information, please follow other related articles on the PHP Chinese website!