← back to Only CSS: Joint Animationcompare with ground truth →
model output
LLaMA 4 Scout
Only CSS: Joint Animation
A 0.75T 0.39
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>Animation</title>
7 <style>
8 body {
9 margin: 0;
10 background-color: #fff;
11 display: flex;
12 justify-content: center;
13 align-items: center;
14 height: 100vh;
15 overflow: hidden;
16 }
17 .rectangle {
18 position: relative;
19 width: 200px;
20 height: 20px;
21 background-color: #007bff;
22 border-radius: 2px;
23 transform-origin: center;
24 }
25 .dot {
26 position: absolute;
27 top: 50%;
28 left: 50%;
29 transform: translate(-50%, -50%);
30 width: 8px;
31 height: 8px;
32 background-color: #ffff00;
33 border-radius: 50%;
34 }
35 </style>
36</head>
37<body>
38 <div class="rectangle">
39 <div class="dot"></div>
40 </div>
41 <script>
42 const rectangle = document.querySelector('.rectangle');
43 rectangle.style.transform = 'rotate(0deg)';
44 let angle = 0;
45 function animate() {
46 angle += 1;
47 if (angle > 360) angle = 0;
48 rectangle.style.transform = `rotate(${angle}deg)`;
49 requestAnimationFrame(animate);
50 }
51 animate();
52 </script>
53</body>
54</html>