Button With Image Zoom On Hover

Developer
Size
3,642 Kb
Views
12,144

How do I make an button with image zoom on hover?

Simple buttons that zoom in on the photo nested within a link. Also has a basic overlay effect for the text to help separate it from the background and keep it readable.. What is a button with image zoom on hover? How do you make a button with image zoom on hover? This script and codes were developed by Chris Steurer on 08 December 2022, Thursday.

Button With Image Zoom On Hover Previews

Button With Image Zoom On Hover - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Button With Image Zoom On Hover</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="twoButtonContainer"> <a href="" class="catImageButton"><div class="buttonText">Shop For <span>DESKS</span></div> <img src="https://cdn1.bigcommerce.com/server800/8c900/product_images/uploaded_images/test-zoom-image.jpg?t=1401392592"> </a>
</div>
<div class="twoButtonContainer"> <a href="" class="catImageButton"><div class="buttonText">Shop For <span>CHAIRS</span></div> <img src="https://cdn1.bigcommerce.com/server800/8c900/product_images/uploaded_images/test-zoom-image2.jpg?t=1401395770"> </a>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
</body>
</html>

Button With Image Zoom On Hover - Script Codes CSS Codes

/* General Styles (Not Needed) */
@import url(https://fonts.googleapis.com/css?family=Roboto:400,300,700);
html { min-height: 100%;
}
body { background: linear-gradient(0deg, #f0efe6, #f2f5ff); font-family: 'Roboto', sans-serif; font-weight: 300;
}
* { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box;
}
/*////////////////////////////////// // Button Styles \
//////////////////////////////////*/
/* This is only an extension class (not used in HTML) to control global animation timing */
.animationControl, a.catImageButton, a.catImageButton span, a.catImageButton img, a.catImageButton .buttonText { -webkit-transition: all 1s ease; -moz-transition: all 1s ease; -o-transition: all 1s ease; -ms-transition: all 1s ease; transition: all 1s ease;
}
/* Button Container Layout */
.twoButtonContainer { width: 50%; min-width: 190px; float: left; /* Not Needed (simply places the container nearer the center of the page for display purposes only) */ margin-top: 15vh;
}
/* Normal State */
a.catImageButton { display: block; text-decoration: none; height: 75px; width: 180px; border: solid 2px #dbdbdb; margin: 0 auto; color: #efefef; overflow: hidden;
}
a.catImageButton span { display: block; font-size: 2em; line-height: 0.8em; color: #fff;
}
a.catImageButton img { height: 75px; width: 176px; -webkit-filter: blur(1px); -moz-filter: blur(1px); -o-filter: blur(1px); -ms-filter: blur(1px); filter: blur(1px); position: relative; top: -95px;
}
a.catImageButton .buttonText { height: 95px; width: 182px; padding: 10px 0 10px 0; position: relative; z-index: 10; right: 5px; background: rgba(0, 0, 0, 0.2); text-align: center;
}
/* Button Hover State */
a.catImageButton:hover { border: solid 2px #666;
}
a.catImageButton:hover img { /* The height and width are what control the zoom effect. Set to a larger size to zoom further, smaller size to zoom out */ height: 95px; width: 224px; /* Unblur the image */ -webkit-filter: blur(0px); -moz-filter: blur(0px); -o-filter: blur(0px); -ms-filter: blur(0px); filter: blur(0px);
}
/* Fade out the text on hover to get a better view of the image */
a.catImageButton:hover .buttonText,
a.catImageButton:hover .buttonText span { color: rgba(255, 255, 255, 0.2);
}
Button With Image Zoom On Hover - Script Codes
Button With Image Zoom On Hover - Script Codes
Home Page Home
Developer Chris Steurer
Username stoypenny
Uploaded December 08, 2022
Rating 3
Size 3,642 Kb
Views 12,144
Do you need developer help for Button With Image Zoom On Hover?

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!

Chris Steurer (stoypenny) Script Codes
Create amazing SEO content 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!