Triangle Bounce 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>Triangle Bounce 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: #ffe0e0; font-family: Arial, sans-serif; margin: 0; } .image-container-triangle { position: relative; width: 340px; height: 340px; clip-path: polygon(50% 0%, 100% 100%, 0% 100%); overflow: hidden; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); } .image-container-triangle img { width: 100%; height: 100%; object-fit: cover; } .overlay-triangle { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); background: rgba(0, 0, 0, 0.6); padding: 10px 20px; border-radius: 20px; color: white; font-size: 20px; display: flex; align-items: center; gap: 10px; opacity: 0; transition: opacity 0.5s ease-in-out; } .image-container-triangle:hover .overlay-triangle { opacity: 1; } .overlay-triangle i { animation: bounce 1s infinite alternate; } @keyframes bounce { to { transform: translateY(-10px); } } </style> </head> <body> <div class="image-container-triangle"> <img src="placeholder.png" alt="Random Image"> <div class="overlay-triangle"> <i class="fas fa-music"></i> <span>🎵 Music</span> </div> </div> </body> </html>