Skip to content

Instantly share code, notes, and snippets.

@tavriaforever
Forked from tyv/dabblet.css
Created May 11, 2012 21:50
Show Gist options
  • Save tavriaforever/2662598 to your computer and use it in GitHub Desktop.
Save tavriaforever/2662598 to your computer and use it in GitHub Desktop.
по состоянию checked включать/выключать
/*
по состоянию checked включать/выключать
соответствующие элементы
http://clck.ru/d/Jxj_mgDC143fZ
*/
input
{
display: none;
}
#red:checked ~ .red
{
display: none;
}
<form>
<div>
<input type="checkbox" id="red">
<input type="checkbox" id="green">
<input type="checkbox" id="blue">
<label for="red">красные</label>
<label for="green">зеленые</label>
<label for="blue">синие</label>
<span class="red">красные</span>
<span class="green">зеленые</span>
<span class="green">зеленые</span>
<span class="red">красные</span>
<span class="blue">синие</span>
<span class="green">зеленые</span>
<span class="red">красные</span>
<span class="blue">синие</span>
<span class="red">красные</span>
<span class="green">зеленые</span>
<span class="blue">синие</span>
</div>
</form>
{"view":"separate","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment