summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-transforms/change-transform-origin-property.html
blob: 2a623eb711d57e5f77cdb14d571d6639022de724 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!DOCTYPE html>
<html class="reftest-wait">
<title>Change transform-origin property</title>
<link rel="author" title="Philip Rogers" href="mailto:pdr@chromium.org">
<link rel="help" href="https://crbug.com/1365255">
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<style>
#target {
  will-change: transform;
  transform: rotate(90deg);
  transform-origin: 100px 100px;
  width: 100px;
  height: 100px;
  background: green;
}
#container {
  width: 100px;
  height: 100px;
  background: red;
}
</style>
<p>Test passes if there is a filled green square.</p>
<div id="container">
  <div id="target"></div>
</div>
<script>
requestAnimationFrame(() => {
  requestAnimationFrame(() => {
    target.style.transformOrigin = '50px 50px';
    document.documentElement.removeAttribute('class');
  });
});
</script>