Blurred Overlay 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>Blurred Overlay Image</title> <style> body { display: flex; justify-content: center; align-items: center; height: 100vh; background: #f9f9f9; margin: 0; font-family: Arial, sans-serif; } .image-container { position: relative; width: 300px; height: 400px; overflow: hidden; border-radius: 20px; } .image { width: 100%; height: 100%; object-fit: cover; border-radius: 20px; transition: transform 0.5s ease-in-out; } .overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: url('https://via.placeholder.com/300x400') center/cover no-repeat; filter: blur(5px); transition: transform 0.5s ease-in-out; transform: scale(1.1); } .image-container:hover .overlay { transform: scale(1); } </style> </head> <body> <div class="image-container"> <img class="image" src="https://via.placeholder.com/300x400" alt="Sample Image"> <div class="overlay"></div> </div> </body> </html>