Donc, j'essaie de faire cela quand je survole l'image, la div apparaît. Malheureusement, je ne suis pas en mesure de le faire, et je ne sais pas pourquoi cela ne fonctionne pas.Div ne s'affiche pas en survol?
Voici mon code:
.summary:hover {
opacity: .6;
-moz-transition: all .1s ease-in-out;
-o-transition: all .1s ease-in-out;
-webkit-transition: all .1s ease-in-out;
transition: all .1s ease-in-out;
}
.summaryOverlay {
position: absolute;
margin-left: 5%;
margin-top: 3%;
height: 200px;
width: 280px;
z-index: 2;
background-color: #E7DFDD;
color: #0E0B16;
font-family: Verdana;
font-size: 15px;
opacity: .9;
-moz-transition: all .1s ease-in-out;
-o-transition: all .1s ease-in-out;
-webkit-transition: all .1s ease-in-out;
transition: all .1s ease-in-out;
text-align: center;
display: none;
}
.summary:hover .summaryOverlay {
display: block;
}
<div class="leftAlign" id="lastWish">
<img class="summary" alt="the last wish" src="lastWish.jpg" style="width: inherit; height: inherit;" />
</div>
<div class="summaryOverlay">
Geralt is a witcher.
<br><br> Yet he is no ordinary killer-for-hire.
<br><br> His sole purpose: to destroy the monsters that plague the world.
<br><br> But not everything monstrous-looking is evil and not everything fair is good. . . and in every fairy tale there is a grain of truth.
</div>
J'ai compris, merci! –