Skip to content

Instantly share code, notes, and snippets.

@joseacat
Created December 30, 2020 00:33
Show Gist options
  • Save joseacat/757a30f97a128a5464f8c5c35b2b72ec to your computer and use it in GitHub Desktop.
Save joseacat/757a30f97a128a5464f8c5c35b2b72ec to your computer and use it in GitHub Desktop.
Plegables con inputs de tipo checkbox. Solo CSS.
.bloque-plegable > input + * {
display: none;
}
.bloque-plegable > input:checked + * {
display: block;
}
.bloque-plegable > input[type=checkbox] {
display: none;
}
.bloque-plegable > label {
cursor: pointer;
}
<div class="bloque-plegable">
<label for="plegable-1">Titulo</label>
<input type="checkbox" id="plegable-1" />
<div class="interior-plegable">
<p>Minions ipsum daa jeje pepete la bodaaa uuuhhh. Me want bananaaa! me want bananaaa! Bee do bee do bee do hana dul sae daa tank yuuu! Pepete uuuhhh tank yuuu! Tank yuuu! gelatooo tulaliloo potatoooo jiji gelatooo. Hahaha tank yuuu! Hahaha poulet tikka masala uuuhhh. Gelatooo poopayee pepete poopayee chasy hana dul sae underweaaar bananaaaa jiji bee do bee do bee do butt. Me want bananaaa! gelatooo uuuhhh butt hahaha para tú poopayee.</p>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment