--> Zoom In/Out Images On Mouse Hover With Single Image | Experience Lab - Online business creation and development guide for bloggers and startups

Zoom In/Out Images On Mouse Hover With Single Image

There are many tutorials online which show users how to achieve a hover effect on their buttons and other images using mouse hover and they ...



zoom-imagesThere are many tutorials online which show users how to achieve a hover effect on their buttons and other images using mouse hover and they often instruct to use a second, larger image.  Another method used is using jQuery to enlarge the size of the image. But with a little bit of trickery, this can be done solely using Css3 and normal html.

Here is a demo:



Live Demo




Note : This trick is best viewed in the latest version of any browser other than IE.

This tutorial has been split into two parts:


  1. CSS implementation

  2. HTML Implementation





CSS implementation:


1. Go To Blogger > Design > Edit HTML

2. and search for


]]></b:skin>


3. Now right above it, paste this code:


/*------- MBT ZOOM-OUT ZOOM-IN -------*/

.mbtzoom {
padding:5px;
position:fixed;
bottom: 35px;
right:10px;
cursor: pointer;
text-decoration: none;
border: 0px solid transparent;
-moz-transition: all 0.3s ease-out; 
-o-transition: all 0.3s ease-out; 
-webkit-transition: all 0.3s ease-out; 
-ms-transition: all 0.3s ease-out; 
transition: all 0.3s ease-out; 
}

.mbtzoom:hover  {
  zoom: 2;
  text-enlarge: 2;
  -moz-transform: scale(2);
  -o-transform: scale(2);
  transform: scale(2);
}



Same procedure as the other option, edit the values to your picture, and change the zoom to how big you want the picture after the transition.




HTML Implementation:


Now whenever you wish to apply the zoom effect to any image you want simply use this code,


<a href="URL OF PAGE" class="mbtzoom"><img  width="60px" height="60px" src="IMAGE LINK" alt="back to top"  /></a>


  • Replace URL OF PAGE with the page link. On clicking the image the user will be taken to that page

  • Replace IMAGE LINK with the link of the picture

  • Make sure to Keep width and height equal to half the size of original image. For example if the image size is 100px by 100px then set width="50px" and height="50px"




That’s it! Your image should be zooming/enlarging beautifully on your blog/website!


DEMO


As a DEMO simply paste this code on MBT HTML Editor




<style>
.mbtzoom {
padding:5px;
position:fixed;
bottom: 35px;
right:10px;
cursor: pointer;
text-decoration: none;
border: 0px solid transparent;
-moz-transition: all 0.3s ease-out; 
-o-transition: all 0.3s ease-out; 
-webkit-transition: all 0.3s ease-out; 
-ms-transition: all 0.3s ease-out; 
transition: all 0.3s ease-out; 
}

.mbtzoom:hover  {
  zoom: 2;
  text-enlarge: 2;
  -moz-transform: scale(2);
  -o-transform: scale(2);
  transform: scale(2);
}
</style>

<a href="#" class="mbtzoom"><img  width="60px" height="60px" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnIm7vxJWF6E-gvaOoWf_ZFInqhU-KUozoqHJBLYlzwm7ZhJsESYzlOnkvxNk-daVAI1QFk7EjhpwN1DzAOg83ZahIDtT-iKE5WL27_irrzuznDPwbmPgTTagFYHqsB3DP9G_0CNQFPbk/s800/rss-128.png" alt="back to top"  /></a>






Anims



About the Guest Author:

Anims is freelance web designer and enjoys playing around with and learning coding in his free time. He likes to write about Web Technologies such as HTML, CSS and SEO.



COMMENTS

Name

Affiliate Marketing,12,Announcement,34,Bing,9,Bitcoin,38,blog,7,Blogger Resources,42,Blogger Templates,4,blogger tricks,156,Blogging ethics,70,Blogging tips,198,Bugs and Errors,34,Business,11,Copyright Violation,9,CSS and HTMLTricks,95,Designs,8,drop down menu,7,eBook,12,Email Marketing,7,Events,30,Facebook,30,Facebook tricks,49,Google,157,Google AdSense,42,Google Analytics,7,Google Plus,51,Google Plus Tricks,38,Guest Posts,112,home,2,How To,77,Internet,1,JSON Feeds,25,Kitchen Recipes,2,Label Based Sitemap Themes,1,Make Money Online,108,Marketing,17,MBT Blogger Templates,7,Menus,1,News,146,Pages,1,Posts,10,presentations,15,Responsive,10,Reviews,7,SEO,307,Settings,6,Shortcode,15,Sitemap Themes,1,Social Media,155,Technology,7,Templates,1,Tips,2,Tools,1,Traffic Tips,80,Video,19,Web Designing,62,web hosting,18,Webmaster Tools,97,Widgets,199,wordpress,26,
ltr
item
Experience Lab - Online business creation and development guide for bloggers and startups: Zoom In/Out Images On Mouse Hover With Single Image
Zoom In/Out Images On Mouse Hover With Single Image
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuzbitC33VvIPjd3zuWDJwmFIKJqoTa1NFFmy6eQi2rZYGShiPY3ve6oDDV1iY1PAmwdfd3nf0V5nYAGN19nctE_qLGMULbE1EAjv7ysgdcp49TnDdQpa7ZjxRl7imQYqP6pDknGAR0t0/?imgmax=800
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuzbitC33VvIPjd3zuWDJwmFIKJqoTa1NFFmy6eQi2rZYGShiPY3ve6oDDV1iY1PAmwdfd3nf0V5nYAGN19nctE_qLGMULbE1EAjv7ysgdcp49TnDdQpa7ZjxRl7imQYqP6pDknGAR0t0/s72-c/?imgmax=800
Experience Lab - Online business creation and development guide for bloggers and startups
https://www.experiencelab.info/2011/06/zoom-inout-images-on-mouse-hover-with.html
https://www.experiencelab.info/
https://www.experiencelab.info/
https://www.experiencelab.info/2011/06/zoom-inout-images-on-mouse-hover-with.html
true
2959477579779989044
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share. STEP 2: Click the link you shared to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy