+ 1

Is we can give direction any object in svg animation ?

If yes than how can.......

8th May 2019, 2:24 AM
Bhupender
Bhupender - avatar
1 ответ
+ 1
<!--I change like this, the direction of rotation.--> <!DOCTYPE html> <html> <head> <title></title> <style type="text/css"> body{ text-align: center; padding-top: 10%; background: #fcfcfc; } svg{ animation: girar 2s ease-out infinite; } @keyframes girar{ 0% {transform: rotate(-360deg);} /*Change for positive*/ 50% {transform: rotate(180deg);} 100% {transform: rotate(360deg);} /*Change for negative*/ } </style> </head> <body> <svg width="200" height="200"> <rect width="200" height="200" style="fill:rgb(0,0,200);stroke-width:5;stroke:rgb(211, 100, 13)" /> </svg> </body> </html>
12th May 2019, 10:21 PM
Jônatas Araripe
Jônatas Araripe - avatar