CSS - Modal Simple con CSS

 
Vista:
Imágen de perfil de ScriptShow
Val: 571
Plata
Ha mantenido su posición en CSS (en relación al último mes)
Gráfica de CSS

Modal Simple con CSS

Publicado por ScriptShow (125 intervenciones) el 25/12/2019 20:58:30
Saludos,

de vuelta al tema de los Modal... Con un ejemplo básico en CSS como punto de partida.

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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
#modal {
position:fixed;
top:0px;
left:0px;
z-index:4;
width:100%;
height:100%;
padding:8px;
display:none;
cursor:pointer;
filter:alpha(opacity=40);
background-color:rgb(0,0,0);
background-color:rgba(0,0,0,0.4);
font:normal normal 24px/24px sans-serif;
}
input:focus + div#modal {
display:block;
}
</style>
</head>
<body>
<br><br>
<input type="button" value="T e s t">
<div id="modal">Modal Simple</div>
</body>
</html>

Es todo, por ahora.

Espero sea útil.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
1
Responder