Untitled

mail@pastecode.io avatar
unknown
html
a year ago
2.0 kB
1
Indexable
Never
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .div1{
            /*POSICION DEL DIV*/
            position:absolute; 
            z-index:2;
            top:100px;
            left: 70px;
            /*ESTILO DEL DIV*/
            margin-left: 500px;
            color: white;
            text-align: center;
            padding-top: 60px;
            border: 2px black solid;
            margin-top: 60px;
            width: 200px;
            height: 80px;
            background-color: red;
        }
        .div2{
            /*POSICIONAMIENTO DEL DIV*/
            position:absolute; 
            z-index:3;
            top:-20px;
            left: 190px;
            /*ESTILO DEL DIV*/
            margin: auto;
            background-color: green;
             width: 200px;
            height: 120px;
            margin-left: 500px;
            text-align: center;
            color: white;
            padding-top: 70px;
            border: 2px black solid;
            margin-top: 60px;
        }
        .div3{
            /*POSICIONAMIENTO DEL DIV*/
            position:absolute; 
            z-index:1;
            top:30px;
            left: 30px;
            /*ESTILO DEL DIV*/
            background-color: rgb(190, 128, 35) ;
            width: 200px;
            height: 90px;
            margin: auto;
            margin-left: 500px;
            color: white;
            text-align: center;
            padding-top: 20px;
            border: 2px black solid;
            margin-top: 60px;
        }
    </style>
</head>
<body>
   
    <div class="div3">
        <p>z-index:1;</p>
    </div>
    <div class="div1">
        <p> z-index:2;</p>
  
    </div>
    <div class="div2">
        <p>z-index:3;</p>
    </div>
   
  
</body>
</html>