animation2code benchmark
For best compatibility, please view this dashboard in a Chrome browser.
← back to Spinners using Font Icons

model output

Gemini 3 Flash Preview

Spinners using Font Icons

A 0.79T 0.34
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>Segmented Spinner Animation</title>
7    <style>
8        /* 
9           Background matches the deep dark gray of the video 
10        */
11        body {
12            margin: 0;
13            padding: 0;
14            display: flex;
15            justify-content: center;
16            align-items: center;
17            min-height: 100vh;
18            background-color: #1a1a1a;
19            overflow: hidden;
20        }
21
22        /* 
23           The loader is a circular element.
24           We use a conic-gradient to create 5 distinct white segments.
25           360 degrees / 5 segments = 72 degrees per segment cycle.
26           We define a white block (roughly 50deg) and a transparent gap (22deg).
27        */
28        .loader {
29            width: 54px;
30            height: 54px;
31            position: relative;
32            border-radius: 50%;
33            background: conic-gradient(
34                #ffffff 0deg 48deg,
35                transparent 48deg 72deg,
36                #ffffff 72deg 120deg,
37                transparent 120deg 144deg,
38                #ffffff 144deg 192deg,
39                transparent 192deg 216deg,
40                #ffffff 216deg 264deg,
41                transparent 264deg 288deg,
42                #ffffff 288deg 336deg,
43                transparent 336deg 360deg
44            );
45            
46            /* 
47               Masking out the center to create the "ring" effect.
48               This is more performance-efficient than multiple divs.
49            */
50            -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 0);
51            mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 0);
52
53            /* 
54               Adding the subtle glow/halo seen in the video 
55            */
56            filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.4));
57            
58            /* 
59               Continuous clockwise rotation 
60            */
61            animation: spin 1.1s linear infinite;
62        }
63
64        @keyframes spin {
65            0% {
66                transform: rotate(0deg);
67            }
68            100% {
69                transform: rotate(360deg);
70            }
71        }
72
73        /* 
74           Subtle enhancement: A faint outer ring sometimes visible 
75           due to compression or bloom in the original source.
76        */
77        .container {
78            position: relative;
79            display: flex;
80            justify-content: center;
81            align-items: center;
82        }
83
84        .halo {
85            position: absolute;
86            width: 62px;
87            height: 62px;
88            border-radius: 50%;
89            border: 1px solid rgba(255, 255, 255, 0.03);
90            pointer-events: none;
91        }
92    </style>
93</head>
94<body>
95
96    <div class="container">
97        <div class="halo"></div>
98        <div class="loader"></div>
99    </div>
100
101    <script>
102        /**
103         * The animation is handled entirely via CSS for optimal performance 
104         * and to match the smooth 60fps movement of the source video.
105         * No JavaScript logic is required for this specific loop.
106         */
107    </script>
108</body>
109</html>