vendredi 16 décembre 2016

z-index is not working how it is supposed to work.WHY?

//how this z-index formatting is supposed to work is that i should be able to see only the layer with z-index with 150 and not any other ,bt i am able to see all three layers because z-indez isn't working how it is supposed to.enter code here

  <meta charset="UTF-8">
  <title>z-index</title>
  <!--Problem is that the z-index is not at all working-->

  </head>
<body >
   <!--first div is with highest z-index, it should be on the top layer of the screen-->
  <div  style="  background-color: #000000 ;height:1000px;width:1000px;z-index:150">
  <!--second div is with 100 z-index, it should be on the middle layer of the screen-->
    <div style=" background-color: #d0d4db;height:500px;width:500px;z-index:100;">

   <!--third div is with 50 z-index, it should be on the lowest layer of the screen-->
    <div style=" background-color: #990a0a;height:100px;width:100px;z-index:50;">
            </div>
        </div>
    </div>
</body>
</html>




Aucun commentaire:

Enregistrer un commentaire