div { width: 100px; height: 100px; background: #000; color: #fff; line-height: 100px; text-align: center; font-size: 2rem; animation: gira 2s linear infinite; } @keyframes gira { to { transform: rotate(360deg); } }