animation2code benchmark
For best compatibility, please view this dashboard in a Chrome browser.
← back to Only CSS: Joint Animation

model output

LLaMA 4 Scout

Only CSS: Joint Animation

A 0.75T 0.41
compare with ground truth →
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        .bar {
9            position: relative;
10            width: 200px;
11            height: 20px;
12            background-color: #ccc;
13        }
14        .bar .part {
15            position: absolute;
16            top: 0;
17            left: 0;
18            height: 20px;
19            background-color: gray;
20            border-radius: 0;
21        }
22        .bar .part.right {
23            background-color: #ADD8E6;
24        }
25        .dot {
26            position: absolute;
27            width: 10px;
28            height: 10px;
29            border-radius: 50%;
30            background-color: yellow;
31        }
32    </style>
33</head>
34<body>
35    <div class="bar" id="bar">
36        <div class="part" style="width: 50%;"></div>
37        <div class="part right" style="left: 50%; width: 50%;"></div>
38        <div class="dot" style="left: 5px; top: 5px;"></div>
39        <div class="dot" style="left: 155px; top: 5px;"></div>
40    </div>
41
42    <script>
43        const bar = document.getElementById('bar');
44        let angle = 0;
45
46        function animate() {
47            angle += 2;
48            if (angle > 360) angle = 0;
49
50            bar.style.transform = `rotate(${angle}deg)`;
51            requestAnimationFrame(animate);
52        }
53
54        animate();
55    </script>
56</body>
57</html>