Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8352847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T09:05:24+00:00 2026-06-09T09:05:24+00:00

I am trying to transform my image back to original size after user hover

  • 0

I am trying to transform my image back to original size after user hover out of my image..Not sure what to do here..

MY css

//doesn't work
.imgDiv img{

-webkit-transform:scale(1, 1);
-moz-transform:scale(1, 1);
-o-transform:scale(1, 1);
-ms-transform:scale(1, 1);
transform:scale(1, 1);

}


//enlarge the image but don't know how to shrink them back

.imgDiv:hover img{

-webkit-transform:scale(1.15, 1.15);
-moz-transform:scale(1.15, 1.15);
-o-transform:scale(1.15, 1.15);
-ms-transform:scale(1.15, 1.15);
transform:scale(1.15, 1.15);

}

html…

<div class='imgDiv'>

     <img src='a.jpg' />
     <img src='b.jpg' />
     <img src='c.jpg' />
     <img src='d.jpg' />

</div>

Thanks for the help….

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T09:05:26+00:00Added an answer on June 9, 2026 at 9:05 am

    Just remove all the transform properties from the original declaration. Since the images are, by default, scaled to 1, you don’t need to declare that. Anything that you set in an element’s :hover pseudo class is reverted to its default when the mouse is removed.

    Here is an example.

    Here’s the final CSS:

    .imgDiv:hover img{
        -webkit-transform:scale(1.15, 1.15);
        -moz-transform:scale(1.15, 1.15);
        -o-transform:scale(1.15, 1.15);
        -ms-transform:scale(1.15, 1.15);
        transform:scale(1.15, 1.15);
    }
    

    Of course, if you were trying to apply this to each image, then you’d still remove the .imgDiv img declaration and change .imgDiv:hover img to .imgDiv img:hover.

    Here is an example of that in action.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hoping someone can help, i'm trying to work out how to transform an image
I am trying to animate the transform property of a view. Here is my
I have been trying to figure out how to display a background image behind
I am trying to transform a bit of xml which represents an image gallery
I trying to spin an image using CSS keyframes to rotate(360deg) . I used
I am trying to find the fourier transform of an image in matlab. I
I'm trying to rotate an image by just touch and move. Here is my
I'm trying to scale an image down, change the image, then scale it back
Possible Duplicate: translate vs transform-origin css3 I've been stuck trying to figure out how
I'm trying to make this: <span class=introduction> <img alt=image src=/picture.jpg /> </span> transform into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.