Mostrar texto en MouseOver para imagen en html
Frecuentes
Visto 542,040 veces
4 Respuestas
17
You can use CSS hover
Link to jsfiddle here: http://jsfiddle.net/ANKwQ/5/
HTML:
<a><img src='https://encrypted-tbn2.google.com/images?q=tbn:ANd9GcQB3a3aouZcIPEF0di4r9uK4c0r9FlFnCasg_P8ISk8tZytippZRQ'></a>
<div>text</div>
CSS:
div {
display: none;
border:1px solid #000;
height:30px;
width:290px;
margin-left:10px;
}
a:hover + div {
display: block;
}
Respondido el 12 de enero de 16 a las 15:01
6
You can do like this also:
HTML:
<a><img src='https://encrypted-tbn2.google.com/images?q=tbn:ANd9GcQB3a3aouZcIPEF0di4r9uK4c0r9FlFnCasg_P8ISk8tZytippZRQ' onmouseover="somefunction();"></a>
En javascript:
function somefunction()
{
//Do somethisg.
}
Respondido el 18 de diciembre de 12 a las 10:12
3
You can use CSS hover in combination with an image background.
CO
.image
{
background:url(images/back.png);
height:100px;
width:100px;
display: block;
float:left;
}
.image a {
display: none;
}
.image a:hover {
display: block;
}
HTML
<div class="image"><a href="#">Text you want on mouseover</a></div>
Respondido 24 ago 12, 09:08
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas html image or haz tu propia pregunta.
También puedes utilizar la
title
on other things like<a ...
anchors,<p>
,<div>
,<input>
, etc.. See: w3schools.com/tags/att_global_title.asp - Gris