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

model output

Claude Sonnet 4.6

Only CSS: Joint Animation

A 0.87T 0.51
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>Rotating Bars Animation</title>
7<style>
8  * { margin: 0; padding: 0; box-sizing: border-box; }
9  
10  body {
11    width: 1024px;
12    height: 768px;
13    background: white;
14    overflow: hidden;
15  }
16
17  .container {
18    position: absolute;
19    top: 50%;
20    left: 50%;
21    transform: translate(-50%, -50%);
22    animation: rotate 3s linear infinite;
23  }
24
25  @keyframes rotate {
26    from { transform: translate(-50%, -50%) rotate(0deg); }
27    to   { transform: translate(-50%, -50%) rotate(360deg); }
28  }
29
30  .bars {
31    position: relative;
32    display: flex;
33    align-items: center;
34  }
35
36  .bar-gray {
37    width: 260px;
38    height: 70px;
39    background: #999;
40    position: relative;
41    z-index: 2;
42  }
43
44  .bar-blue {
45    width: 260px;
46    height: 70px;
47    background: #5aabcc;
48    position: relative;
49    margin-left: -30px;
50    z-index: 1;
51  }
52
53  /* Overlap connector - darker blue */
54  .bar-blue::before {
55    content: '';
56    position: absolute;
57    left: 0;
58    top: 0;
59    width: 30px;
60    height: 70px;
61    background: #4090b0;
62    z-index: 3;
63  }
64
65  .dot {
66    position: absolute;
67    width: 14px;
68    height: 14px;
69    background: #f5c000;
70    border-radius: 50%;
71    top: 50%;
72    transform: translateY(-50%);
73    border: 2px solid #fff;
74    z-index: 10;
75  }
76
77  .bar-gray .dot {
78    left: 30px;
79  }
80
81  .bar-blue .dot {
82    right: 50px;
83  }
84</style>
85</head>
86<body>
87<div class="container">
88  <div class="bars">
89    <div class="bar-gray">
90      <div class="dot"></div>
91    </div>
92    <div class="bar-blue">
93      <div class="dot"></div>
94    </div>
95  </div>
96</div>
97</body>
98</html>