Jump to content

Recommended Posts

Posted (edited)

hi ,

please can someone check the fiddle https://jsfiddle.net/yqktb40L/18/ and say why the block remains stuck in its position and not oscillate up n down every 2 seconds as it is supposed to. 

There is nothing wrong with the code. It works great on a local server but does not work in jsfiddle. 

Thank you. 

Edited by ajoo

Share this post


Link to post
Share on other sites

You need to specify your units for the margin values.  161px, not just 161.

 

  • Thanks 1
  • Great Answer 1

Share this post


Link to post
Share on other sites

If you want a simple animation like to move to the top and bottom every 2 seconds then CSS's animations can do it better.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks guys !

@ kicken: Thanks loads. I couldn't have spotted it in 10 days at least. The previous ten bear testimony to that !😲

@ requinix: Thanks for that tip ! I'll bear it in mind. 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.