I have been trying to use particle effect in the background and have some text centred in that div and have the particle effect in the background.
The javascript files refer to the particleJS
files which you can find here.Github ParticleJS.
But Im just not able to centre it in the middle, is it because JS is rendering it simultaneously is there a way I can do it.
Link to codepen
body{
margin:0px;
padding: 0px;
}
canvas{
display:block;
height: 100%;
vertical-align:bottom;
}
#particles-js{
background-color: black;
display: flex;
flex-direction: column;
justify-content: center;
align-content: center;
}
#name{
color: white;
text-align: center;
}
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" href = "particle.js"></script>
<link rel="stylesheet" media="screen" href="style.css">
<title>Linko</title>
</head>
<body>
<div id="wrapper">
<div id="particles-js">
<script src="particles.js"></script>
<script src="app.js"></script>
<div id="name">
<p>Hello there</p>
</div>
</div>
</div>
</body>
</html>