DEV Community

Cover image for Random Stars Animation with JavaScript and CSS
Simon Köhler
Simon Köhler

Posted on

10 6

Random Stars Animation with JavaScript and CSS

I created this pen a long time ago when a client wanted this type of animation for a project. Maybe someone can use the code to make the animation smoother.

Things you could add

  • more randomness
  • performance optimization

Any ideas?

Write a comment ;-)

Top comments (2)

Collapse
 
afif profile image
Temani Afif

Note that when using position:absolute you don't need to set the display property (the element will get blockified by default) unless you will have content inside where you need a particular container (flexbox, css grid, table, etc)

Collapse
 
typo3freelancer profile image
Simon Köhler

Thanks for the hint, you're right ;-)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more