Animált háttér CSS-el, JS-el, DIV-ekben lévő szöveggel
2022-07-18T12:51:38+02:00
2022-07-29T14:50:15+02:00
2022-07-29T15:05:31+02:00
Seishin
Sziasztok!

Van egy animált háttér, ami nagyon megtetszett nekem, de sehogy nem tudom hátra küldeni, hogy szöveget tudjak rá írni.
Próbáltam egy olyan megoldást, hogy z-index: -100-at beálltottam és akkor elvileg rá kellene mennie a szövegnek, de nem sikerült. (Egy másik próbálkozásomnál ez megoldotta a problémát.)

Valaki esetleg tud valamilyen megoldást, hogy hogyan tudnék szöveget írni rá?

Köszi előre is, a ódot csatoltam (nem az én munkám, én csak megérteni és használni szeretném).
Mutasd a teljes hozzászólást!
Csatolt állomány
Egy lehetséges megoldás a sok közül....

HTML

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>CSS Animation Effect - Hover dots</title> <link rel="stylesheet" href="style.css"> </head> <body> <div class="container"> <div id="particles-js"></div> </div> <script type="text/javascript" src="particles.js"></script> <script type="text/javascript" src="app.js"></script> <div class="text_content"> <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> </divs> </body> </html>
CSS
* { margin:0; padding:0; } body { min-height: 100vh; } #particles-js { height: 100vh; background: #262626; overflow: hidden; } .text_content { position:absolute; left:0; right:0; top:0; bottom:0; color:#fff; padding:20px; overflow: auto; } .text_content p { margin-top:20px; }
Mutasd a teljes hozzászólást!

abcd