Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-14-2013, 04:23 PM   PM User | #1
eedesign
New to the CF scene

 
Join Date: Feb 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
eedesign is an unknown quantity at this point
CSS Magnification Scale Hover Effect

I'm using a css coding to enlarge/scale images when hover. The code works very nice. However, it makes all the images on my page to have the scale effect. What can I do to make it work on just some images?
Here is the code I'm using:
http://www.priteshgupta.com/2011/06/.../#comment-1058
Thanks!

eedesign
eedesign is offline   Reply With Quote
Old 02-14-2013, 06:21 PM   PM User | #2
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Hello eedesign,
Give those images you wish to have the effect a class so you can style them seperately from other images on your page.

Something like this <img src="your.jpg" alt="description" class="scale" />

Then your CSS would be like this
Code:
img.scale {
-webkit-transition: all 200ms linear;
    -moz-transition: all 200ms linear;
    -o-transition: all 200ms linear;
    transition: all 200ms linear;
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    -o-transform: translateZ(0);
    transform: translateZ(0);
}
img.scale:hover {
-webkit-transform: scale(1.1) translateZ(0);
    -moz-transform: scale(1.1) translateZ(0);
    -o-transform: scale(1.1) translateZ(0);
    transform: scale(1.1) translateZ(0);
}
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:30 PM.


Advertisement
Log in to turn off these ads.