Hover reveal images

Developer
Size
2,160 Kb
Views
16,192

How do I make an hover reveal images?

On hover reveal more of the image while keeping it in the center. What is a hover reveal images? How do you make a hover reveal images? This script and codes were developed by Anthony Young on 31 October 2022, Monday.

Hover reveal images Previews

Hover reveal images - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Hover reveal images</title> <script src="https://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="container"> <ul> <li> <a href="#" style="background-repeat: no-repeat; background-image:url('http://farm9.staticflickr.com/8335/8127276463_86f1f2c8c8_q.jpg'); background-position: center center;"> </a> </li> <li class="last"> <a href="#" style="background-repeat: no-repeat; background-image:url('http://farm9.staticflickr.com/8047/8129486662_7fb68bfe52_q.jpg'); background-position: center center;"> </a> </li> </ul>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Hover reveal images - Script Codes CSS Codes

/*General styles*/
#container { padding: 10px; background: grey;
}
ul { background: #fff; border: 1px dashed grey; display: block; height: 200px; margin: 0px; padding: 0px; width: 400px;
}
li { list-style: none; float: left; margin: 25px 25px; width: 150px; height: 150px; overflow: hidden; border: 1px solid blue;
}
li.last { margin-right: 0px;
}
li a { width: 100px; height: 100px; display: block; margin-top: 25px; margin-left: 25px;
}

Hover reveal images - Script Codes JS Codes

$('ul li a').hover(function(){ $(this).stop().animate({ 'width':'150px', 'height': '150px', 'margin-left':'0px', 'margin-top':'0px' },'scale');
}, function(){ $(this).stop().animate({ 'width':'100px', 'height': '100px', 'margin-left':'25px', 'margin-top':'25px' },'scale');
});
Hover reveal images - Script Codes
Hover reveal images - Script Codes
Home Page Home
Developer Anthony Young
Username ayoungh
Uploaded October 31, 2022
Rating 3
Size 2,160 Kb
Views 16,192
Do you need developer help for Hover reveal images?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Anthony Young (ayoungh) Script Codes
Create amazing Facebook ads with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!