← back to Only CSS: Joint Animationcompare with ground truth →
model output
LLaMA 4 Scout
Only CSS: Joint Animation
A 0.79T 0.22
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <title>Recreate Animation</title>
7 <style>
8 .rectangle {
9 position: relative;
10 width: 200px;
11 height: 50px;
12 background-color: blue;
13 border: 1px solid gray;
14 }
15 .dot1 {
16 position: absolute;
17 top: 50%;
18 left: 10%;
19 transform: translateY(-50%);
20 width: 10px;
21 height: 10px;
22 background-color: lightblue;
23 border-radius: 50%;
24 }
25 .dot2 {
26 position: absolute;
27 top: 50%;
28 right: 10%;
29 transform: translateY(-50%);
30 width: 10px;
31 height: 10px;
32 background-color: yellow;
33 border-radius: 50%;
34 }
35 </style>
36</head>
37<body>
38 <div class="rectangle">
39 <div class="dot1"></div>
40 <div class="dot2"></div>
41 </div>
42
43 <script>
44 // Get the rectangle element
45 const rectangle = document.querySelector('.rectangle');
46
47 // Define the animation function
48 function animate() {
49 // Initial state
50 rectangle.style.transform = 'rotate(0deg)';
51 rectangle.style.transition = 'transform 0.5s ease-in-out';
52
53 // Animation sequence
54 setTimeout(() => {
55 rectangle.style.transform = 'rotate(10deg)';
56 }, 1000);
57
58 setTimeout(() => {
59 rectangle.style.transform = 'rotate(20deg)';
60 }, 2000);
61
62 setTimeout(() => {
63 rectangle.style.transform = 'rotate(30deg)';
64 }, 3000);
65
66 setTimeout(() => {
67 rectangle.style.transform = 'rotate(40deg)';
68 }, 4000);
69
70 setTimeout(() => {
71 rectangle.style.transform = 'rotate(50deg)';
72 }, 5000);
73
74 setTimeout(() => {
75 rectangle.style.transform = 'rotate(60deg)';
76 }, 6000);
77
78 setTimeout(() => {
79 rectangle.style.transform = 'rotate(70deg)';
80 }, 7000);
81
82 setTimeout(() => {
83 rectangle.style.transform = 'rotate(80deg)';
84 }, 8000);
85
86 setTimeout(() => {
87 rectangle.style.transform = 'rotate(0deg)';
88 }, 9000);
89 }
90
91 // Start the animation
92 animate();
93 </script>
94</body>
95</html>