javascript - HTML content underneath WebGL animation not clickable -
i trying figure out why html content underneath webgl animation cannot clicked or interact with.
please see example.
currently div containing animation set to:
.webgl-glitch { position: absolute; z-index: 2; overflow: hidden; opacity: 0.5; }
..otherwise not display @ all.
i have tried setting z-index: 1; property on header/container div, not seem help.
here html section of header including animation div:
<!-- begin header animation --> <div class="webgl-glitch"></div> <!-- end header animation --> <header id="principalheader" class="centercontainer aligncenter fullscreen tintbackground stonebackground" style="z-index:1"> <div> <div class="container"> <!-- site logo--> <a href="#" class="logo"><img alt="kubo" src="img/logo.png"></a> <!-- site principal slogan--> <h1>digital exploration the digital age</h1> <!-- site resume--> <div class="row"> <div class="hidden-xs col-md-10 col-md-offset-1"> <h2>craft experiences <strong>defy</strong> expectations<br/> create the twin <strong>virtues</strong> of inspiration , innovation<br/> beauty in simplicity , complexity <strong>combined</strong> best of both worlds</h2> </div> <div class="col-md-10 col-md-offset-1"> <a class="fa fa-angle-down" href="#" data-scrollto="#about"></a> </div> </div> </div> </div> </header>
another thing have noticed if wrap .web-glitch animation div inside html5 canvas element not display @ all? why be?
the property have on canvas in the css @ moment width: 100%;
it's not because of webgl animation, it's because of .webgl-glitch
<div>
. putting 1 html element on top of prevents 1 clicking whatever underneath it; doesn't matter if it's transparent or not.
as <canvas>
: put inside <canvas>
element supposed placeholder browsers don't support said element; if browser supports it, whatever put inside <canvas>
ignored; so, if have this:
<canvas> <h1>sorry, browser not support canvas element.</h1> </canvas>
on browsers not support canvas, message "sorry, browser not support canvas element." displayed user; on other hand, browsers support canvas not display elements inside canvas tag, , allow canvas operate normally.
Comments
Post a Comment