« Back to the HTML Forum

how to make pictures "move" when u hover over them???

Posted by mi1kiwi

posted

Forum: HTML Group

i've seen it on other people's profiles but i have no idea how to do it :(


i hope someone understands what i'm talking about............



Report Topic

2 Replies

Sort Replies:

Reply by 1di0tcl0wn

posted
updated

Move like shaking? Move up and down? I know how to do it, but depending what type of moving you want, I have different methods for them. Is it like what I have on my profile?


Permalink Report Reply

Reply by oxygenfox

posted

the way i'd do it is having a style tag with 

<style>

nav:hover {

translate 20px 10px;

}

</style>

where the 20px moves it right 20 and 10px moves it up by 10 on hover (replace nav with the selector of what you want to move)

replace one of the numbers with 0 if you want it to only go in one direction


to smooth it out there's the animate tag and everything but that's the basic method iirc


Permalink Report Reply