soulwire / sketch.js

Cross-Platform JavaScript Creative Coding Framework
MIT License
4.09k stars 431 forks source link

Particle effect not getting affected in header division #98

Open sayakpaul opened 7 years ago

sayakpaul commented 7 years ago

`<!doctype html>

sketch.js » Basic Example

Ayushi, many many happy returns of the day! May the almighty give you every happiness that you want and deserve as well. Happy Birthday :')



child_care

`

I am using above piece of code but the particle effect is getting started after the header. I want it to start from the top itself.

awelles commented 6 years ago

Hey sayak, Best not to seek general coding advice by opening an issue. But..

Put your h2 and button in a div, follow it with a div with id 'container', and set both to 'position:absolute' in their css. Then they'll overlap in the window.

So like this:

...
...
<body>
  <div style="position:absolute">
    <h2 class = "header center cyan-text">Ayushi, many many happy returns of the day! May the 
    almighty give you every happiness that you want and deserve as well. Happy Birthday :') </h2>
    <br><br><center><a class="btn btn-floating btn-large pulse btn blue lighten-3" href = 
    "https://i.imgur.com/acoUTOT.jpg" target="_blank"><i class="material-icons">child_care</i>
     </a></center>
  </div>
  <div id="container" style="position:absolute"></div>

<script>
...
...