mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-02 10:34:27 +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
22 lines
383 B
HTML
22 lines
383 B
HTML
<!DOCTYPE HTML>
|
|
<style>
|
|
div {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 200px;
|
|
height: 100px;
|
|
background-color: red;
|
|
transition: all 10s;
|
|
}
|
|
.transition {
|
|
transform: rotate(360deg);
|
|
}
|
|
</style>
|
|
<div></div>
|
|
<script>
|
|
window.addEventListener('load', () => {
|
|
document.querySelector('div').classList.add('transition');
|
|
}, false);
|
|
</script>
|