Answer the question
In order to leave comments, you need to log in
Why doesn't an element appear on hover in Firefox?
Hello.
Tell
me, why does not an element appear in firefox on hover?
In chrome, everything is fine, here is a piece of code:
<div class="block">
<img src=""">
<div class="hover">Hover</div>
</div>
.block{
width: 25%;
margin: 0 -4px -4px 0;
display: inline-block;
position: relative;
overflow: hidden;
cursor: pointer;}
.block:after{
content: "";
width: 100%;
height: 100%;
display: block;
position: absolute;
top: 0;
left: 0;
transition: 0.5s;
}
.block:hover:after{
background-color: rgba(240,146,41,0.7);
transition: 0.5s;
}
.hover{
width: 100%;
display: inline-block;
position: absolute;
top: 43%;
color: #fff;
z-index: 100;
opacity: 0;
transition: 0.5s;
}
.block:hover .hover{
opacity: 1;
transition: 0.5s;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question