Created
May 12, 2015 18:44
-
-
Save anonymous/a0962f33ad6823fa8768 to your computer and use it in GitHub Desktop.
Revisions
-
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ <div class="dropdown"> <input type="checkbox" name="foo-input" id="foo-input" class="expand-input" autocomplete="off" /> <label for="foo-input" class="expand-label">Foo Menu - Click here to toggle</label> <nav class="expand-block"> <ul> <li><a href="">Foo 1</a></li> <li><a href="">Foo 2</a></li> <li><a href="">Foo 3</a></li> <li><a href="">Foo 4</a></li> <li><a href="">Foo 5</a></li> </ul> </nav> </div> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,56 @@ .dropdown {} .expand-label { background: #e7e7e7; } .expand-block { opacity: 0; transition: all .4s linear; position: relative; overflow: hidden; z-index: 10; height: 0; } .expand-input:checked ~ .expand-label { background-color: #ffe7e7; } .expand-input:checked ~ .expand-block { opacity: 1; height: initial; } /* The CSS Below is irrelevant */ .expand-label { display: block; padding: 10px; border: 1px solid #ccc; cursor: pointer; } .expand-input { display: none; } .expand-block ul { padding-left: 0; margin: 0; } .expand-block li { border: 1px solid #ccc; list-style: none inside; } .expand-block a { display: block; text-decoration: none; padding: 10px; } .expand-block li + li { margin-top: 2px; } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ xGVGVy ('-' * 6) A [Pen](http://codepen.io/anon/pen/xGVGVy) by [Captain Anonymous](http://codepen.io/anon) on [CodePen](http://codepen.io/). [License](http://codepen.io/anon/pen/xGVGVy/license).