简体   繁体   中英

Bootstrap container blocks js animated background

I can't figure out why is bootstrap container blocking the particles-js animation behind the text. I want the background begind text and around it to be animated aswell.. :/

Example

Code:

 .gradient-bg { background: rgba(120, 87, 158, 1); background: -webkit-linear-gradient(left, rgba(55, 49, 42, 1) 0%, rgba(47, 41, 35, 1) 0%, rgba(120, 87, 158, 1) 100%); } /* ---- particles.js container ---- */ #particles-js { position: fixed; width: 100%; height: 100%; background-repeat: no-repeat; } .bg-primary { background-color: #ff00ff !important; } body { padding-top: 70px; } h1 { color: aliceblue } 
 <!-- particles.js container --> <body> <div id="particles-js" class="gradient-bg"> <div class="container"> <h1>This thing blocks the background.</h1> <h1>This thing blocks the background.</h1> <h1>Particles below are animated.</h1> </div> </div> <!-- particles.js lib - https://github.com/VincentGarreau/particles.js --> <script src="http://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"> </script> <script src="../scripts/particles.js"> </script> </body> 

 <body> <div id="particles-js"> </div> <div class="container"> <h1>This thing blocks the background.</h1> <h1>This thing blocks the background.</h1> <h1>Particles below are animated.</h1> </div> <!-- particles.js lib - https://github.com/VincentGarreau/particles.js --> <script src="http://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"> </script> <script src="../scripts/particles.js"> </script> </body> 

Solved.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM