CSS 호버에 몇 가지 문제가 있습니다.CSS 호버링이 올바르게 작동하지 않습니다.
나는 이미지 위로 마우스를 가져 가면 링크가있는 투명한 div가 표시되어이를 클릭하여 다른 페이지로 이동할 수 있습니다. 이 페이지와 같이 닮은 것 뉴스를 가리키면
위로 마우스를 가져 가면 태그가 벗어나 호버링이 제대로 표시되지 않습니다. 이 붙어 는
.cvr:hover {
background-color: rgba(0, 0, 0, 0.600);
height: inherit;
width: inherit;
float: left;
position: absolute;
left: 0px;
top: 0px;
visibility: visible;
}
.link {
word-break: normal;
word-wrap: break-word;
display: block;
height: inherit;
width: inherit;
text-align: center;
text-decoration: none;
color: aliceblue;
visibility: hidden;
}
.cvr:hover>.link {
visibility: visible;
}
.img {
width: inherit;
height: inherit;
}
.clear {
clear: both;
}
<div class="person">
<img class="img" src="http://www.gene-quantification.de/logo-img-cz.png">
<div class="cvr">
<a class="link" href="#"> link text is here</a>
</div>
</div>
<div class="person">
<img class="img" src="http://www.gene-quantification.de/logo-img-cz.png">
<div class="cvr">
<a class="link" href="#"> link text is here</a>
</div>
</div>
<div class="clear"></div>