← back to Only CSS: Grid Template Animationcompare with ground truth →
model output
LLaMA 4 Scout
Only CSS: Grid Template Animation
A 0.36T 0.25
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 background-color: #000;
10 display: flex;
11 justify-content: center;
12 align-items: center;
13 height: 100vh;
14 margin: 0;
15 }
16 .grid {
17 display: grid;
18 grid-template-columns: repeat(10, 1fr);
19 grid-template-rows: repeat(10, 1fr);
20 gap: 2px;
21 width: 400px;
22 height: 400px;
23 transform: rotate(0deg);
24 }
25 .cell {
26 background-color: #000;
27 border: 1px solid #0ff;
28 display: flex;
29 justify-content: center;
30 align-items: center;
31 }
32 .cell::before {
33 content: "";
34 width: 6px;
35 height: 6px;
36 background-color: #0ff;
37 border-radius: 50%;
38 }
39 @keyframes rotate {
40 0% {
41 transform: rotate(0deg);
42 }
43 100% {
44 transform: rotate(360deg);
45 }
46 }
47 .animate {
48 animation: rotate 30s linear infinite;
49 }
50 </style>
51</head>
52<body>
53 <div class="grid animate">
54 ${Array(10).fill().map(() => Array(10).fill().map(() => '<div class="cell"></div>').join('')).join('')}
55 </div>
56 <script>
57 // JavaScript code to control the animation
58 const grid = document.querySelector('.grid');
59 // Add event listeners or other JavaScript logic here
60 </script>
61</body>
62</html>