SVG css animation Hover
HTML
<!doctype html>
<title>Test 58. CSS transforms on SVG content</title>
<style>
svga {
border: 1px solid #999;
-webkit-transform: rotate( 120deg );
}
svg {
-webkit-animation: rotation 2s infinite linear;
}
svg:hover{ -webkit-animation-play-state: paused; }
@-webkit-keyframes rotation {
from {-webkit-transform: rotate(0deg);}
to {-webkit-transform: rotate(359deg);}
}
</style>
<svg
class='rotate'
xmlns='http://www.w3.org/svg/2000' version='1.1'
width='200' height='200'>
<rect
x='50' y='50'
width='100' height='100'
fill='yellow' stroke='navy' stroke-width='10' />
</svg>
<svg
class='rotate'
xmlns='http://www.w3.org/svg/2000' version='1.1'
width='200' height='200'>
<rect
x='50' y='50'
width='100' height='100'
fill='yellow' stroke='navy' stroke-width='10' />
</svg>