File: css-transition.html

package info (click to toggle)
node-playwright 1.38.0%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 32,728 kB
  • sloc: javascript: 114,018; sh: 899; java: 372; xml: 247; cs: 118; python: 29; makefile: 12
file content (21 lines) | stat: -rw-r--r-- 383 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!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>