Image overlay hover effects with css3 on mouse over

In this tutorial, we are going to create some image overlay hover effects using CSS3. When we hover over an image, a neat transition will occur, showing us some text.

Image overlay hover effects using CSS3 are a great way to add some nice interactivity on your site. In the old days, like that effects you have need to use script language like JavaScript, Jquery etc. Nowadays, we want some smooth transitions and some UI effects on mouse over. So Let’s start to create “Image overlay hover effects with css3 on mouse over“.

You can also view live demo and download code using given downloading link below of article page.

Here we are putting HTML code copy to use.

<div class="view view-fourth">
    <a href="http://www.phpkida.com/">
        <img src="http://www.phpkida.com/wp-content/uploads/2017/01/wordpress-theme-development.jpg" class="img-responsive" alt="Image overlay hover effects with css3 on mouse over"/>
        <div class="mask">
            <p>Image overlay hover effects with css3 on mouse over.</p>
        </div>
    </a>
</div>
<div class="view view-fourth">
    <a href="http://www.phpkida.com/">
        <img src="http://www.phpkida.com/wp-content/uploads/2016/07/How-To-Remove-The-Footer-Copyright-Of-Your-Admin-In-Wordpress.jpg" class="img-responsive" alt="Image overlay hover effects with css3 on mouse over"/>
        <div class="mask">
            <p>Image overlay hover effects with css3 on mouse over.</p>
        </div>
    </a>
</div>
<div class="view view-fourth">
    <a href="http://www.phpkida.com/wordpress/how-to-create-registration-form-in-wordpress-without-plugin/">
        <img src="http://www.phpkida.com/wp-content/uploads/2017/02/how-to-create-registration-form-in-WordPress-without-plugin.jpg" class="img-responsive" alt="Image overlay hover effects with css3 on mouse over"/>
        <div class="mask">
            <p>Image overlay hover effects with css3 on mouse over.</p>
        </div>
    </a>
</div>
<div class="view view-fourth">
    <a href="www.phpkida.com/mukesh-jakhar-wordpress-php-web-developer-and-designer/">
        <img src="http://www.phpkida.com/wp-content/themes/phpkida/mukesh/img/about-mukesh-jakhar.JPG" class="img-responsive" alt="Image overlay hover effects with css3 on mouse over"/>
        <div class="mask">
            <p>Image overlay hover effects with css3 on mouse over.</p>
        </div>
    </a>
</div>
<div class="view view-fourth">
    <a href="http://www.phpkida.com/php-tutorial/copy-multiple-files-from-one-folder-to-another-php/">
        <img src="http://www.phpkida.com/wp-content/uploads/2017/01/how-to-copy-multiple-files-from-one-folder-to-another-in-php.jpg" class="img-responsive" alt="Image overlay hover effects with css3 on mouse over"/>
        <div class="mask">
            <p>Image overlay hover effects with css3 on mouse over.</p>
        </div>
    </a>
</div>
<div class="view view-fourth">
    <a href="http://www.phpkida.com/css-tutorials/css-shape-effects/">
        <img src="http://www.phpkida.com/wp-content/uploads/2016/04/css-shapes-effects.png" class="img-responsive" alt="Image overlay hover effects with css3 on mouse over"/>
        <div class="mask">
            <p>Image overlay hover effects with css3 on mouse over.</p>
        </div>
    </a>
</div>
<div class="view view-fourth">
    <a href="http://www.phpkida.com/php-tutorial/how-to-implement-google-currency-converter-in-php/">
        <img src="http://www.phpkida.com/wp-content/uploads/2016/09/How-to-implement-google-currency-converter-in-php.jpg" class="img-responsive" alt="Image overlay hover effects with css3 on mouse over"/>
        <div class="mask">
            <p>Image overlay hover effects with css3 on mouse over</p>
        </div>
    </a>
</div>
<div class="view view-fourth">
    <a href="http://www.phpkida.com/ajax/form-submission-using-ajax-php-javascript/">
        <img src="http://www.phpkida.com/wp-content/uploads/2016/09/Form-Submission-Using-Ajax-PHP-and-Javascript.jpg" class="img-responsive" alt="Image overlay hover effects with css3 on mouse over"/>
        <div class="mask">
            <p>Image overlay hover effects with css3 on mouse over.</p>
        </div>
    </a>
</div>

Here we are putting CSS code copy to use.

.view {
    width: 23%;
    height: 320px;
    margin: 20px 11px;
    float: left;
    border: 0px solid #fff;
    overflow: hidden;
    position: relative;
    text-align: center;
    -webkit-box-shadow: 0px 0px 5px #333;;
    -moz-box-shadow: 0px 0px 5px #333;;
    box-shadow: 0px 0px 5px #333;;
    cursor: default;
    padding: 0;
}
.view .mask, .view .content {
    width: 100%;
    height: 325px;
    position: absolute;
    overflow: hidden;
    top: 0;
    left: 0;
}
.view img {
   display: block;
   position: relative;
}
.view p {
    font-style: italic;
    font-size: 1em;
    position: relative;
    color: #fff;
    text-align: center;
    margin: 8em auto 0;
    width: 95%;
    line-height: 33px;
}
.view-fourth img {
   -webkit-transition: all 0.4s ease-in-out 0.2s;
   -moz-transition: all 0.4s ease-in-out 0.2s;
   -o-transition: all 0.4s ease-in-out 0.2s;
   -ms-transition: all 0.4s ease-in-out 0.2s;
   transition: all 0.4s ease-in-out 0.2s;
   -ms-filter: "progid: DXImageTransform.Microsoft.Alpha(Opacity=100)";
   filter: alpha(opacity=100);
   opacity: 1;
   width:100%;
   height: 100%;
}
.view-fourth .mask {
   background-color: #000;
   -ms-filter: "progid: DXImageTransform.Microsoft.Alpha(Opacity=0)";
   filter: alpha(opacity=0);
   opacity: 0;
   -webkit-transform: scale(0) rotate(-180deg);
   -moz-transform: scale(0) rotate(-180deg);
   -o-transform: scale(0) rotate(-180deg);
   -ms-transform: scale(0) rotate(-180deg);
   transform: scale(0) rotate(-180deg);
   -webkit-transition: all 0.4s ease-in;
   -moz-transition: all 0.4s ease-in;
   -o-transition: all 0.4s ease-in;
   -ms-transition: all 0.4s ease-in;
   transition: all 0.4s ease-in;
   -webkit-border-radius: 0px;
   -moz-border-radius: 0px;
   border-radius: 0px;
}
.view-fourth p {
   -ms-filter: "progid: DXImageTransform.Microsoft.Alpha(Opacity=0)";
   filter: alpha(opacity=0);
   opacity: 0;
   -webkit-transition: all 0.5s ease-in-out;
   -moz-transition: all 0.5s ease-in-out;
   -o-transition: all 0.5s ease-in-out;
   -ms-transition: all 0.5s ease-in-out;
   transition: all 0.5s ease-in-out;
}
.view-fourth:hover .mask {
   -ms-filter: "progid: DXImageTransform.Microsoft.Alpha(Opacity=100)";
   filter: alpha(opacity=100);
   opacity: 1;
   -webkit-transform: scale(1) rotate(0deg);
   -moz-transform: scale(1) rotate(0deg);
   -o-transform: scale(1) rotate(0deg);
   -ms-transform: scale(1) rotate(0deg);
   transform: scale(1) rotate(0deg);
   -webkit-transition-delay: 0.2s;
   -moz-transition-delay: 0.2s;
   -o-transition-delay: 0.2s;
   -ms-transition-delay: 0.2s;
   transition-delay: 0.2s;
}
.view-fourth:hover img {
   -webkit-transform: scale(0);
   -moz-transform: scale(0);
   -o-transform: scale(0);
   -ms-transform: scale(0);
   transform: scale(0);
   -ms-filter: "progid: DXImageTransform.Microsoft.Alpha(Opacity=0)";
   filter: alpha(opacity=0);
   opacity: 0;
   -webkit-transition-delay: 0s;
   -moz-transition-delay: 0s;
   -o-transition-delay: 0s;
   -ms-transition-delay: 0s;
   transition-delay: 0s;
}
.view-fourth:hover p{
   -ms-filter: "progid: DXImageTransform.Microsoft.Alpha(Opacity=100)";
   filter: alpha(opacity=100);
   opacity: 1;
   -webkit-transition-delay: 0.5s;
   -moz-transition-delay: 0.5s;
   -o-transition-delay: 0.5s;
   -ms-transition-delay: 0.5s;
   transition-delay: 0.5s;
}
p.galleryp {
    color: #022b23;
    line-height: 33px;
    font-size: 17px;
    margin-bottom: 15px;
}
.gallery:nth-child(odd) {
    background: #1abc9c!important;
    -webkit-transform: rotate(3deg);
    -moz-transform: rotate(3deg);
    -o-transform: rotate(3deg);
    -ms-transform: rotate(3deg);
    transform: rotate(3deg);
    margin-top: -200px;
}
.gallery:nth-child(odd) .se-content {
    -webkit-transform: rotate(-3deg);
    -moz-transform: rotate(-3deg);
    -o-transform: rotate(-3deg);
    -ms-transform: rotate(-3deg);
    transform: rotate(-3deg);
    color: #d9e0e2;
    padding: 62px 100px 210px 100px;
}

You Can View Demo and download Source Code of This Tutorial

If You have any question and problem in this code feel free, leave comment below! SHARE WITH YOUR FRIENDS..

About Author

My name is Mukesh Jakhar and I am a Web Application Developer and Software Developer, currently living in Jaipur, India. I have a Master of Computer Application in Computer Science from JNU Jaipur University. I loves to write on technology and programming topics. Apart from this, I love to travel and enjoy the beauty of nature.

Sign up for weekly update

Milkshake is almost ready. If you're interested in testing it out, then sign up below to get exclusive access.