Skip to content

Instantly share code, notes, and snippets.

@ehsan
Created April 14, 2012 20:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ehsan/2387812 to your computer and use it in GitHub Desktop.
Save ehsan/2387812 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<style>
#pos { position: absolute; }
#trans { -moz-transform: translateY(300px); }
</style>
<script>
onload=function(){
var pos = document.getElementById("pos");
var trans = document.getElementById("trans");
trans.style.MozTransform = "translateY(100px)";
pos.style.left = "100px";
};
</script>
</head>
<body>
<div style="position: relative">
<div id="pos">
bar
</div>
</div>
<div id="trans">
foo
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment