File tree Expand file tree Collapse file tree 3 files changed +37
-0
lines changed
Expand file tree Collapse file tree 3 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 1717< li > < a href ="idle-callback-time/index.html "> idle-callback-time</ a > </ li >
1818< li > < a href ="initiators/index.html "> initiators</ a > </ li >
1919< li > < a href ="layout-shift/index.html "> layout-shift</ a > </ li >
20+ < li > < a href ="layout-shift-animations/index.html "> layout-shift-animations</ a > </ li >
2021< li > < a href ="layout-shift-unsized-images/index.html "> layout-shift-unsized-images</ a > </ li >
2122< li > < a href ="lcp-critical-path/index.html "> lcp-critical-path</ a > </ li >
2223< li > < a href ="lcp-discovery-delay/index.html "> lcp-discovery-delay</ a > </ li >
Original file line number Diff line number Diff line change 1+ < html >
2+ < head >
3+ < title > Layout Shift from non-composited animation on load</ title >
4+ < style >
5+ .box {
6+ height : 100px ;
7+ width : 100px ;
8+ }
9+ # red {
10+ background-color : red;
11+ animation : 0.2s linear 0s 1 forwards change-height;
12+ }
13+ @keyframes change-height {
14+ from {
15+ height : 100px ;
16+ }
17+ to {
18+ height : 300px ;
19+ }
20+ }
21+ p {
22+ font-family : sans-serif;
23+ }
24+ </ style >
25+ </ head >
26+ < body >
27+ < div id ="red " class ="box "> </ div >
28+ < p > This is some text content below the animated box.</ p >
29+ < p >
30+ When the red box above changes height, this text will be pushed down,
31+ causing a layout shift.
32+ </ p >
33+ < p > This makes the impact of the non-composited animation very clear.</ p >
34+ < script src ="app.js "> </ script >
35+ </ body >
36+ </ html >
You can’t perform that action at this time.
0 commit comments