K
K
kevus2018-06-28 16:42:04
css
kevus, 2018-06-28 16:42:04

Body:hover and z-index of two blocks?

<body class="body">
<div class="banner_holder">
<div class="blc1"></div>
<div class="blc2"></div>
</div>
</body>

blc1=z-index: 2;
blc2=z-index: 1;
How to change z-index when hovering over body?
blc1=z-index: 1;
blc2=z-index: 2;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Proskurin, 2018-06-28
@Vlad_IT

What's the problem?

.blc1 {
   z-index: 2;
}
.blc2 {
   z-index: 1;
}
.body:hover .blc1 {
   z-index: 1;
}
.body:hover .blc2 {
   z-index: 2;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question