Código de CSS - Mostrar un bocadillo o popup encima de una texto dado

1
estrellaestrellaestrellaestrellaestrella(1)

Publicado el 20 de Diciembre del 2019gráfica de visualizaciones de la versión: 1
2.340 visualizaciones desde el 20 de Diciembre del 2019
estrellaestrellaestrellaestrellaestrella
estrellaestrellaestrellaestrella
estrellaestrellaestrella
estrellaestrella
estrella

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta charset="utf8">
    <style>
    /* Popup container - can be anything you want */
    .popup {
        display:inline-block;
        position: relative;
        cursor: pointer;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
 
    /* The actual popup */
    .popup .popuptext {
        visibility: hidden;
        width: 160px;
        background-color: #555;
        color: #fff;
        text-align: center;
        border-radius: 6px;
        padding: 8px 0;
        position: absolute;
        z-index: 1;
        bottom: 125%;
        left: 50%;
        margin-left: -80px;
    }
 
    /* Popup arrow */
    .popup .popuptext::after {
        content: "";
        position: absolute;
        top: 100%;
        left: 50%;
        margin-left: -5px;
        border-width: 5px;
        border-style: solid;
        border-color: #555 transparent transparent transparent;
    }
 
    /* Toggle this class - hide and show the popup */
    .popup .show {
        visibility: visible;
        -webkit-animation: fadeIn 1s;
        animation: fadeIn 1s;
    }
 
    /* Add animation (fade in the popup) */
    @-webkit-keyframes fadeIn {
        from {opacity: 0;}
        to {opacity: 1;}
    }
 
    @keyframes fadeIn {
        from {opacity: 0;}
        to {opacity:1 ;}
    }
    </style>
</head>
<body style="text-align:center">
 
    <h2>Popup</h2>
 
    <div class="popup" onclick="myFunction(this)"> - Haz clic aquí para ver un popup -
      <span class="popuptext" id="myPopup">A Simple Popup!</span>
    </div>
 
    <div class="popup" onclick="myFunction(this)"> Haz clic aquí para ver otro popup -
      <span class="popuptext" id="myPopup">Un segundo Popup!</span>
    </div>
 
</body>
 
<script>
// When the user clicks on div, open the popup
function myFunction(el) {
  el.firstElementChild.classList.toggle("show");
}
</script>



Comentarios sobre la versión: 1 (1)

Imágen de perfil
20 de Diciembre del 2019
estrellaestrellaestrellaestrellaestrella
No ha dejado ningún comentario
Responder

Comentar la versión: 1

Nombre
Correo (no se visualiza en la web)
Valoración
Comentarios...
CerrarCerrar
CerrarCerrar
Cerrar

Tienes que ser un usuario registrado para poder insertar imágenes, archivos y/o videos.

Puedes registrarte o validarte desde aquí.

Codigo
Negrita
Subrayado
Tachado
Cursiva
Insertar enlace
Imagen externa
Emoticon
Tabular
Centrar
Titulo
Linea
Disminuir
Aumentar
Vista preliminar
sonreir
dientes
lengua
guiño
enfadado
confundido
llorar
avergonzado
sorprendido
triste
sol
estrella
jarra
camara
taza de cafe
email
beso
bombilla
amor
mal
bien
Es necesario revisar y aceptar las políticas de privacidad

http://lwp-l.com/s5743