Use CSS variable-position: absolute;z-index: 2; and CSS3 variable-:root,( --primary-color:), background: var(--primary-color,red);@media screen and (max-width:600px)
This is CSS sheet (z-index)
#styld{
background: var(--color-2,green);
height: 250px;
width: 250px;
position: absolute;
z-index: 2;
}
#styla{
background: var(--primary-color,red);
height: 250px;
width: 250px;
position: absolute;
left: 150px;
z-index: 1;
}
/* css3 vribal */
:root{
--primary-color: rgb(179, 24, 24);
--color-2: rgb(26, 26, 2);
}
@media screen and (max-width:600px){
:root{
--primary-color: black;
--color-2: yellow;}
}
This is HTML sheet <div clear>
<div>
<div id="styld"></div>
<div id="styla"></div>
</div>
<div class="div-clear"></div>
Comments
Post a Comment