mirror of
https://github.com/microsoft/playwright.git
synced 2024-11-29 01:53:54 +03:00
6f87955243
This option stops all kinds of CSS animations while doing screenshot: - CSS animations - CSS transitions - Web Animations Animations get different treatment depending on animation duration: - finite animations are fast-forwarded to its end, issuing the `transitionend` event. - Infinite animations are resetted to its beginning, and then resumed after the screenshot. References #9938, fixes #11912
24 lines
380 B
HTML
24 lines
380 B
HTML
<!DOCTYPE HTML>
|
|
<style>
|
|
div {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 200px;
|
|
height: 100px;
|
|
background-color: red;
|
|
}
|
|
</style>
|
|
<div></div>
|
|
<script>
|
|
document.querySelector('div').animate(
|
|
[
|
|
{ transform: 'rotate(0deg)' },
|
|
{ transform: 'rotate(360deg)' }
|
|
], {
|
|
duration: 3000,
|
|
iterations: Infinity
|
|
}
|
|
);
|
|
</script>
|