Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Particles.js behind some pre-existing HTML #295

Closed
GreemDev opened this issue Mar 16, 2018 · 9 comments
Closed

Particles.js behind some pre-existing HTML #295

GreemDev opened this issue Mar 16, 2018 · 9 comments

Comments

@GreemDev
Copy link

Hey there! I was wondering how I could put P.js behind my existing HTML. My HTML is https://greemdotcs.github.io - and the source for my HTML is on my repo for that website, https://github.com/greemdotcs/greemdotcs.github.io/ - Thanks!

@lsbyerley
Copy link

@GreemdotCS Don't wrap all of your html in the particles-js div. Just do <div id="particles-js"></div> and then set the styling to:

#particles-js {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

Then, be sure to set z-index:2; on the other elements you want in front of the particles

@GreemDev
Copy link
Author

it doesn't appear in front; just at the top of the page

@kgalka
Copy link

kgalka commented Mar 27, 2018

Hi GreemdotCS,
I simply added position: fixed; top: 0; in the inspector, and particles appear in front.

@GreemDev
Copy link
Author

Still isn't working. Also, my website has moved to https://greem.xyz - Thanks!

@GreemDev
Copy link
Author

And sorry for my super inactivity, :p

@Markyroson
Copy link

Markyroson commented Dec 22, 2018

@GreemdotCS Don't wrap all of your html in the particles-js div. Just do <div id="particles-js"></div> and then set the styling to:

#particles-js {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

Then, be sure to set z-index:2; on the other elements you want in front of the particles

Thank you so so much for posting that. It solved the issue I was having (same one as OP, though unfortunately it didn't help them for some reason).

@GreemDev
Copy link
Author

Eh, I've remade my site 2 times since I posted that. :P

@Markyroson
Copy link

Eh, I've remade my site 2 times since I posted that. :P

So is it resolved for you now?

@GreemDev
Copy link
Author

would've expected that to be obvious, but yeah. my new site doesn't use particles.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants