mirror of
https://github.com/servo/servo
synced 2026-04-25 17:15:48 +02:00
Transition events are not yet supported, and the only animatable properties are `top`, `right`, `bottom`, and `left`. However, all other features of transitions are supported. There are no automated tests at present because I'm not sure how best to test it, but three manual tests are included.
29 lines
505 B
HTML
29 lines
505 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<style>
|
|
section {
|
|
position: absolute;
|
|
display: block;
|
|
left: 0;
|
|
width: 64px;
|
|
height: 64px;
|
|
background: cadetblue;
|
|
transition: left 3s ease, top 1500ms ease;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<section></section>
|
|
<script>
|
|
var sections = document.getElementsByTagName('section');
|
|
sections[0].setAttribute('style', "left: 0; top: 0");
|
|
setTimeout(function() {
|
|
sections[0].setAttribute('style', "left: 512px; top: 512px");
|
|
}, 0);
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|
|
|