particles.js icon indicating copy to clipboard operation
particles.js copied to clipboard

particles in flexbox layout

Open marti2221 opened this issue 8 years ago • 7 comments
trafficstars

Is it possible to use particles as a background in a flexbox layout? I cant seem to find anything.

marti2221 avatar Aug 23 '17 19:08 marti2221

Did you try it?

I had the same question yesterday, didn't take me long to find out you can :)

https://codepen.io/digisam/pen/yoQYdB

digiltd avatar Aug 29 '17 12:08 digiltd

This helped me

canvas { position: fixed; top: 0; left: 0; }

ghost avatar Oct 25 '17 15:10 ghost

Did you try it?

I had the same question yesterday, didn't take me long to find out you can :)

https://codepen.io/digisam/pen/yoQYdB

But links ain't working tho.. can you help?

KickAss101 avatar Apr 02 '19 08:04 KickAss101

Did you try it? I had the same question yesterday, didn't take me long to find out you can :) https://codepen.io/digisam/pen/yoQYdB

But links ain't working tho.. can you help?

Yeah.. I figured it out that you need to add position: absolute; or position: relative; Both works! What happened is that remaining elements got z-index smaller than the background but we can't just change the z-index 'cause then you wouldn't find the background or the links won't work.. Just randomly tried using position: relative and it works. Basically it rests the position as the element in the document flow, ig.

KickAss101 avatar Apr 02 '19 09:04 KickAss101

glad you sorted it

link seems to be working ok for me

digiltd avatar Apr 10 '19 06:04 digiltd

This worked fine for me. Give it a try..

canvas { position: absolute; top: 10vh; left: 0; overflow: hidden; }

Sharat01 avatar Sep 09 '21 20:09 Sharat01

#particles-js { position: absolute; width: 100%; height: 100%; z-index: auto} it helped me!

x15-rahul avatar Aug 25 '22 10:08 x15-rahul