<html>
<body>
<h1>This is a Heading</h1>
<img id="img1" src="bulbon.gif" style="position:absolute;left:0px;top:0px;z-index:-1;width:100px;height:180px;">
<button type="button" onclick="myFunction()">Alert stack order</button>
<p>Default z-index is 0. Z-index -1 has lower priority.</p>
<script>
function myFunction() {
alert(document.getElementById("img1").style.zIndex);
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_style_zindex2 by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:03:42 GMT -->
</html>