kamokoba
kamokoba

Reputation: 597

how to animate .jpg image with CSS?

I'm trying to animate an image, i.e. to move it from left to right and back but before implementing css animation keyframes i noticed that i cannot get element in html to obey css style - whatever style changes i make in css, the picture on the webpage remains the same size, in the same place, etc.

html:

<div id="animate"><img class="thumbnail" src="flower.jpg"> </div>

css:

#animate 
{
    width:200x;
    height:100px;
}

Upvotes: 2

Views: 2744

Answers (1)

dezman
dezman

Reputation: 19358

You need to select the img:

img {
    width: 200x;
    height: 100px;
}

Upvotes: 5

Related Questions