« Web, HTML, Tech Forum

Making it rain on my page [closed]

Posted by mchan

posted

Forum: Web, HTML, Tech

Hello! I wanted to ask whether it is possible to achieve a raining effect on your page, as it it goes over everything and is animated? Tried a bunch of different codes but nothing worked :-( Any advice greatly appreciated and many thanks :-D


Report Topic

4 Replies

Sort Replies:

Reply by arlo atomickk

posted

here's a code for a rain overlay:


html:before{ 

   animation: grain 8s steps(10) infinite;

   background-image: url(https://i.ibb.co/mSXbshm/Boaz9s-Y-2.gif);

   background-size: 100%; 

   content: "";

   height: 200%;

   left: -50%;

   opacity:.5;

   position: fixed;

   top: -100%;

   width: 200%;

   pointer-events:none}


Permalink Report Reply

Reply by mchan

posted

This code sadly does not work :-( thank you for your reply though 


Permalink Report Reply

Reply by EngiQu33ring

posted

Are you doing a full refresh (ctrl + F5) after changing your CSS? Your browser may not be picking up the changes if you've tried several solutions and none have worked, sometimes you have to do a full refresh to clear out any old styles the browser may be holding on to


Permalink Report Reply

Reply by mchan

posted

It worked now, thank you for your reply! I used a bit of a different code, but I'll keep your tip in mind for the future ! :-D


Permalink Report Reply

mchan closed this Forum Topic