Diamond Flip Image - MeggiTools
Run
Toggle Theme
Share Link
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Diamond Flip Image</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"> <style> body { display: flex; justify-content: center; align-items: center; height: 100vh; background-color: #dfe6e9; font-family: Arial, sans-serif; margin: 0; } .image-container-diamond { position: relative; width: 300px; height: 300px; transform: rotate(45deg); overflow: hidden; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); transition: transform 0.5s ease-in-out; } .image-container-diamond img { width: 100%; height: 100%; object-fit: cover; transform: rotate(-45deg); } .image-container-diamond:hover { transform: rotate(0deg); } .overlay-diamond { position: absolute; bottom: 10px; right: 10px; background: rgba(0, 0, 0, 0.6); padding: 10px; border-radius: 50%; color: white; font-size: 24px; opacity: 0; transition: opacity 0.5s ease-in-out; } .image-container-diamond:hover .overlay-diamond { opacity: 1; } </style> </head> <body> <div class="image-container-diamond"> <img src="placeholder.png" alt="Random Image"> <div class="overlay-diamond"> <i class="fas fa-gem"></i> </div> </div> </body> </html>