Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
46 lines (39 sloc) 1.19 KB
<!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>Transition of left property</title>
div {
position: relative;
left: 100px;
height: 200px;
width: 300px;
background-color: #9bb;
-webkit-transition-property: left;
-webkit-transition-duration: 1s;
<script type="text/javascript" charset="utf-8">
var flag = true;
function init() {
document.getElementById("target").addEventListener("click", function(evt) {
if (flag) = "300px";
else = "100px";
flag = !flag;
}, false);
window.addEventListener("load", init, false);
<h1>Transition of 'left' property</h1>
<p>The element below should move 200 pixels left or right when clicked</p>
<div id="target">
This element should transition.
Jump to Line
Something went wrong with that request. Please try again.