#circle { position: relative; width: 500px; height: 500px; margin: auto; } .sun-image { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1; } .wheel-img { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); animation: rotate 20s infinite linear; z-index: 0; } .area:hover { filter: brightness(1.2); } @keyframes rotate { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } } document.querySelectorAll('.area').forEach(area => { area.addEventListener('mouseover', function() { this.style.filter = 'brightness(1.2)'; }); area.addEventListener('mouseout', function() { this.style.filter = 'brightness(1)'; }); });