[Question] class instead of div for the container
See original GitHub issueWhich version are you using?
1.18.11
Is the latest version affected?
Not an issue.
Which library are you using?
- Vanilla JS (
tsparticles
) - React (
react-tsparticles
) - Vue.js 2.x (
particles.vue
) - Vue.js 3.x (
particles.vue3
) - Angular (
ng-particles
) - Svelte (
svelte-particles
) - Preact (
preact-particles
) - Inferno (
inferno-particles
) - jQuery (
jquery-particles
)
Question
Instead of using tsparticles as a full size background I want to use it as an element that I can use to replace images. Right know the loader is supporter an id (which is an unique css selector) but is there a way to use a class (can match multiple elements) instead so I don’t have to create 10 identical classes and load tsparticles 10 times? But before that another question is can we load several times tsparticles on the same page?
Of course I’ll use the configuration for all the 10 elements.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Can we use <main> instead of <div class="container"> in ...
I am new to HTML. I like to know it is good to use mark semantic tag instead of something like div class="main-content"?...
Read more >Does div class="container" have any special function?
Depends. if you are talking about bootstrap (you can click on the word bootstrap, will take you to interessting codecademy course) then yes,...
Read more >Lesson 1: Understanding ID and Class in CSS
The first div is a container for the skip to main content link. The second div is a container for your contact information....
Read more ><div>: The Content Division element - HTML - MDN Web Docs
The <div> HTML element is the generic container for flow content. It has no effect on the content or layout until styled in...
Read more >Semantic HTML Guide – 10 Alternatives to Using divs
Use of more appropriate elements instead of the div element leads to better accessibility for readers and easier maintainability for authors.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@matteobruni You’re amazing, thx a lot.
@noraj here you can find a sample with tsParticles in the hero you linked, a little CSS is needed but is not breaking the layout