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 issue #1

Closed
iPankajKumar opened this issue Nov 16, 2020 · 3 comments
Closed

Particles issue #1

iPankajKumar opened this issue Nov 16, 2020 · 3 comments

Comments

@iPankajKumar
Copy link

iPankajKumar commented Nov 16, 2020

I followed the steps of including particles.js in my blog as well, but I noticed that once you resize the browser (Example: mobile device, ipad etc), then in portrait mode the particles only move in the top half.

Solution : Instead of inserting a new div inside background image div, just assign the id "particles-js" to that background div itself.
that way the canvas will be formed inside the background image div instead of a new div below that which doesn't follow the width and height of background.

Old code

<div
    class="background container-fluid" 
    style="background-image: url('{{ strings.TrimSuffix "/" site.BaseURL }}{{ $backgroundImage | relURL }}');"
  >
  <div id="particles-js"></div>
  </div>

New code

<div
    class="background container-fluid" id="particles-js"
    style="background-image: url('{{ strings.TrimSuffix "/" site.BaseURL }}{{ $backgroundImage | relURL }}');"
  >
  </div>
@salihkilicli
Copy link
Owner

salihkilicli commented Nov 17, 2020

Thank you, I realized that after you mentioned. However, when I tried the change you suggested, it completely removed the particles effect from my main page.

I will look into that problem when I have time. I appreciated it.

@iPankajKumar
Copy link
Author

Thank you, I realized that after you mentioned. However, when I tried the change you suggested, it completely removed the particles effect from my main page.

I will look into that problem when I have time. I appreciated it.

That's weird.
We both have the same source code and I copied the particles.js instructions from your description itself.
It works like a charm on my blog www.ipankajsingh.com , even in mobile mode.

@salihkilicli
Copy link
Owner

Hi, sorry for the late reply. I got what you mean now and fixed the issue. Appreciated it!

@salihkilicli salihkilicli pinned this issue Mar 25, 2021
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

2 participants