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