I'm looking to add the particles effect to a div that's defined with Materialize CSS class attributes, but It doesn't seem to be working.

The div in question is just an empty div with color:

<div class="col s4 red" id="canvas"></div>

I have also placed the codepen JS code in a separate file which was imported into the HTML via a script tag:

<script type="text/javascript" src="login.js"></script>      

But I don't see any particle effects, not sure why. Also the CSS attached in the codepen only works (overwrites Materialize when !important is written.

0 Answers