<!DOCTYPE html> | |
<meta charset="UTF-8"> | |
<style> | |
.target { | |
position: relative; | |
width: 100px; | |
height: 100px; | |
background-color: black; | |
display: inline-block; | |
margin-left: 16px; | |
} | |
.expected { | |
background-color: green; | |
margin-left: 0px; | |
} | |
</style> | |
<body> | |
<script src="resources/interpolation-test.js"></script> | |
<script> | |
assertInterpolation({ | |
property: 'left', | |
from: '-10px', | |
to: '10px' | |
}, [ | |
{at: -0.3, is: '-16px'}, | |
{at: 0, is: '-10px'}, | |
{at: 0.5, is: '0px'}, | |
{at: 1, is: '10px'}, | |
{at: 1.5, is: '20px'} | |
]); | |
</script> | |
</body> |