blob: 23b84fb6a0bccb9e4f258732293441a52c9200a8 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<html lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Animation of rotate property</title>
<style type="text/css" media="screen">
div {
-webkit-box-sizing: border-box;
.column {
margin: 10px;
display: inline-block;
vertical-align: top;
.container {
position: relative;
height: 200px;
width: 200px;
margin: 10px;
background-color: silver;
border: 1px solid black;
.box {
position: absolute;
top: 0;
left: 0;
height: 60px;
width: 60px;
border: 1px dotted black;
-webkit-transform-origin: top left; /* to match SVG */
.final {
border: 1px solid blue;
#target, #ref {
-webkit-animation-name: bounce;
-webkit-animation-duration: 2s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-direction: alternate;
-webkit-animation-timing-function: ease-in-out;
@-webkit-keyframes bounce {
from {
-webkit-transform: translate(0px, 0px) scale(1) rotate(0deg);
to {
-webkit-transform: translate(75px, 25px) scale(2) rotate(45deg);
<h1>CSS Animation of 'webkit-transform:' property for SVG</h1>
<p>The SVG animation should be identical with the CSS one</p>
<div class="column">
<h2>SVG compound</h2>
<div class="container">
<svg xmlns="" version="1.1"
viewBox="0 0 200 200" style="width:200px; height:200px;">
<rect id="target" x="0" y="0" width="60" height="60" stroke="blue" fill="none">
<h2>CSS compound</h2>
<div class="container">
<div class="final box" id="ref">