I have a div
with a background image, inside that div
I have
a div
with position:absolute
.
What I want to do is that when I pass the mouse
for the div
container the edge of the div
that is inside is painted in white, until there all perfect.
But then I want that when you pass mouse
for the div
that is inside, the edge of this is painted in another color.
But I can not achieve that, at least with CSS
. Try it with Javascript
and if you can, but I prefer to avoid using Javascript
for this.
Someone who can tell me: what am I doing wrong?
This is my code:
.figure {
position: relative;
width: 15.1%;
display: inline-block;
vertical-align: middle;
left: 3.9%;
right: 3.9%;
text-align: center;
padding: 11% 0;
background-repeat: no-repeat;
background-position: 50% 50%;
background-size: cover;
z-index: 0;
}
.circulo {
position: absolute;
width: 70%;
height: 50%;
max-height: 140px;
max-width: 140px;
left: 0px;
right: 0px;
margin: auto;
top: 0px;
bottom: 0px;
border-radius: 50%;
z-index: 20;
border: solid 8px transparent;
}
.figure:hover .circulo {
border: 8px solid rgba(225, 225, 225, 0.6);
}
.circulo:hover {
border: 8px solid rgba(255, 255, 255, 1.00)
}
<div class="figure" style="background-image:url(images/image)">
<div class="circulo"></div>
</div>