Image Slide on Hover code:
1.index.html:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Image Zoom Effect</title> <link rel="stylesheet" href="style.css"> </head> <body> <div class="container"> <img src="image.jpg"> </div> </body> </html>
2.style.css:
body { background: rgb(131, 223, 247); margin: 0; padding: 0; } .container { width: 300px; height: 200px; position: absolute; top: 50%; left: 50%; transform: translate(-50% , -50%); overflow: hidden; } .container img { width: 100%; transition: 0.5s all ease-in-out; } .container:hover img { transform: scale(1.5) rotate(-15deg); }