Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE html>
<html>
<head>
<title>CSS Motion Path: ray paths</title>
<style>
#container1 {
width: 100px;
height: 100px;
}
#container2 {
width: 200px;
height: 200px;
}
#target1 {
position: relative;
width: 50px;
height: 50px;
background-color: lime;
transform-origin: 0px 0px;
transform: translateX(100px);
}
#target2 {
position: relative;
width: 50px;
height: 50px;
background-color: lime;
transform-origin: 0px 0px;
transform: translateX(200px);
}
</style>
</head>
<body>
<div id="container1">
<div id="target1"></div>
</div>
<div id="container2">
<div id="target2"></div>
</div>
</body>
</html>