Hover Animation Tricks Every Developer Needs – HTML & CSS

Create Stunning Hover Animation Effects with HTML & CSS

Create Stunning Hover Animation Effects with HTML & CSS

In this tutorial, we'll show you how to create beautiful hover animation effects using simple HTML and CSS. It's easy to follow, and you can copy the code directly from this blog post. Let's add some interactive animations to your web projects!

Live Demo:

Image 1

Image 1

Image 2

Image 2

Image 3

Image 3

Code to Copy:

<!-- HTML Code -->
<div class="container">
    <div class="box">
        <img src="https://via.placeholder.com/150" alt="Image 1">
        <p>Image 1</p>
    </div>
    <div class="box">
        <img src="https://via.placeholder.com/150" alt="Image 2">
        <p>Image 2</p>
    </div>
    <div class="box">
        <img src="https://via.placeholder.com/150" alt="Image 3">
        <p>Image 3</p>
    </div>
</div>
    

CSS Code:

/* CSS Code */
.box {
    width: 150px;
    padding: 20px;
    margin: 10px;
    text-align: center;
    border: 2px solid #ddd;
    transition: transform 0.3s, box-shadow 0.3s;
}

.box:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

.box img {
    width: 100%;
    transition: transform 0.3s;
}

.box:hover img {
    transform: rotate(10deg);
}
    

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.
NextGen Digital Welcome to WhatsApp chat
Howdy! How can we help you today?
Type here...