« Back to the HTML Forum

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

Posted by venus

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............

(move like shaking or something)


Report Topic

2 Replies

Sort Replies:

Reply by heath

posted
updated

this will make your profile picture, your friend's pictures, and the user pictures in your comments sections "shake" when you hover your mouse over them.


 <style>

    /* Shake animation keyframes */

    @keyframes shake {

      0% { transform: translate(0, 0); }

      20% { transform: translate(-3px, 0); }

      40% { transform: translate(3px, 0); }

      60% { transform: translate(-3px, 0); }

      80% { transform: translate(3px, 0); }

      100% { transform: translate(0, 0); }

    }

    /* Apply shake on hover */

    .profile-pic img:hover, .friends-grid img:hover, .comments-table td img:hover{

      animation: shake 0.5s;

      animation-iteration-count: 1;

    }

</style>




Permalink Report Reply

Reply by nago

posted

use heath's code! also, i know im a little late, but in this website: https://hessostrange.neocities.org/hovereffects , you have codes for some other cool hover effects!


Permalink Report Reply