/
githubmirror
/
servo
Обзор
Документация
Войти
/
githubmirror
/
servo
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tests/html/transition_multiple.html
26 строк
505 B
Patrick Walton
layout: Implement CSS transitions per CSS-TRANSITIONS § 2.
31 мар 2015, 18:46
31 мар 2015, 18:46
66dd8c8
Код
Авторство
О чём код?
<!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>