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 6701755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:58:20+00:00 2026-05-26T06:58:20+00:00

I am working on css in which when mouse hovers on images, it gets

  • 0

I am working on css in which when mouse hovers on images, it gets bigger. e.g.

#image-div img { width:100px; height:100px;}
#image-div:hover img { width:200px; height:200px;}

Now i want it to be animated a little. Like it shall zoom in slowly, and on mouse out, it shall zoom out slowly. Please help.

Note: I am not very well familiar with javascript.

  • 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-05-26T06:58:20+00:00Added an answer on May 26, 2026 at 6:58 am

    These animations are typically done with Javascript. Rather than writing the Javascript by hand, it is probably easier to use the jQuery library, which includes the “.animate()” method. The animate method requires you give the destination css properties as parameters, like so:

    (Since you wrote you are not familiar with Javascript, I’ve included everything you need to include the jQuery library)

    <script src="http://www.google.com/jsapi" type="text/javascript"></script>
    
    <script type="text/javascript">google.load("jquery", "1.6.4");</script>
    
    <script type="text/javascript">
    
        $(document).ready(function(){
    
            $("#image-div img").live({mouseenter:myfin,
                  mouseleave:myfout});
    
        });
        function myfin () {
        $(this).animate({height: 200, width: 200},1000); //1000 = 1 second animation
    }
    function myfout () {
        $(this).animate({height: '', width: ''},1000); //1000 = 1 second animation
        //setting the height and width to '' will clear the inserted style, leaving you with your original style
    }
    </script>
    

    Then all you should need is to set the height and width to 100px in your CSS, and remove the #image-div:hover definition.

    If you would like to animate using class definitions in your CSS file, you can do so using a jQuery plug-in. See the following question for help on that:

    jQuery.animate() with css class only, without explicit styles

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

Sidebar

Related Questions

I have the following CSS which isn't working in IE7. input:focus{border-width: 2px;border-color: Blue; border-style:
Are there any example of CSS hacks which were working before new version or
A colleague of mine was working on a CSS design which contains an un-ordered
I have particular css through which I am hiding image. Now I want to
The application I'm working on allows users to upload HTML templates with CSS, which
I've got three div's I'm working with: main , which is a container for
One of the projects which I am working uses CSS attribute selector [att] CSS
When working with CSS inside of XML such as <span class=IwuvAS3></span> when parsed in
I am working with some CSS that is poorly written to say the least.
I have a strange problem working with HTML,CSS in different browsers: Firefox 3.6 and

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.