Input
Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Rotate Example</title> <style> .box { width: 100px; height: 100px; background-color: #2ecc71; transition: transform 0.5s ease; } .box:hover { transform: rotate(45deg); /* Rotates the box by 45 degrees */ } </style> </head> <body> <div class="box"></div> </body> </html>