Ver Mensaje Individual
  #2 (permalink)  
Antiguo 14/11/2013, 05:59
Avatar de IsaBelM
IsaBelM
Colaborador
 
Fecha de Ingreso: junio-2008
Mensajes: 5.032
Antigüedad: 15 años, 10 meses
Puntos: 1012
Respuesta: Listas o Menús plegables y desplegables

se puede hacer con la pseudoclase :checked y el selector de adyacente/hermanos
Cita:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es">
<head>
<meta http-equiv="Content-Type" content="application/xhtml; charset=utf-8" />
<title></title>
<style type="text/css">
.checkbox {
width: 0;
height: 0;
overflow: hidden;
position: absolute;
}

.checkbox ~ label {
display: inline-block;
}

.checkbox ~ label ~ div {
display: none;
}

.checkbox:checked ~ label ~ div {
display: block;
}
</style>
</head>
<body>

<form action="">

<input type="checkbox" id="tab" class="checkbox" />
<label for="tab">Tab</label>
<div>Contenido Contenido Contenido Contenido Contenido Contenido Contenido Contenido</div>

</form>

</body>
</html>
__________________
if(ViolenciaDeGénero) {alert('MUJER ASESINADA');}