Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS how to make a image vibrate on click ?

  • This topic is empty.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #42334
    iamRDM
    Participant

    Hello guys,
    Please help me with this.
    When someone click on a image, then it vibrates..
    :)

    #122697
    Paulie_D
    Member

    Is that all it’s supposed to do?

    For how long, in what direction, up and down, side to side?

    Do you mean for a smartphone and you want tactile feedback?

    #122698
    iamRDM
    Participant

    I want the image to vibrate side to side onclick and it vibrates as long as we right click on that image :)

    #122699
    Paulie_D
    Member

    >Right click

    I think that’s reserved for the OS isn’t it?

    I’m pretty sure you could add a JS click event to animate the image quite easily (I assume you would have a special image class) but right click might be somewhat harder.

    I guess the question we need to ask is why do you want this effect and how would it be used?

    #122702
    iamRDM
    Participant

    My bad
    ahhhh… i want t to vibrate ion left click
    javascript will work for me :)

    #122704
    iamRDM
    Participant

    i saw in on a website.
    Tried a hand on it, but wasn’t successful :(

    #122705
    Kitty Giraudel
    Participant

    A CSS animation using translate enabled on :active would be a quick and clean solution. If you want a deeper browser support, then you’ll need JS.

    #122708
    Paulie_D
    Member

    >i saw in on a website

    What site?

    >Tried a hand on it

    Could you pit what you have in Codepen and let us play with it?

    #122709
    Kitty Giraudel
    Participant
    #122771
    rightok32
    Member
    #122782
    TheDoc
    Member

    @Eric – once you start using SCSS you’ll never look back. It’s not faster, since it just compiles down to regular CSS, but you’ll *write* faster.

    #122809
    Kitty Giraudel
    Participant

    I’m used to SCSS. I didn’t even thing about it when making your demo.
    Whatever, I think it’s pretty much what you asked for, right?

Viewing 12 posts - 1 through 12 (of 12 total)
  • The forum ‘CSS’ is closed to new topics and replies.