-
-
Save gcyrillus/4589130 to your computer and use it in GitHub Desktop.
single page, many content each seen individually with acordeon effect
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 characters
| /* single page, many content each seen individually with acordeon effect */ | |
| ul, li { | |
| margin:0; | |
| padding:0; | |
| } | |
| ul{ | |
| background:blue; | |
| margin:0 auto; | |
| width:960px; | |
| display:table; | |
| } | |
| ul li{ | |
| display:table-cell; | |
| background:red; | |
| text-align:center; | |
| line-height:40px; | |
| } | |
| body > div{ | |
| width:960px; | |
| margin:0 auto; | |
| background:green; | |
| max-height:0; | |
| transition:max-height 0.5s; | |
| position:relative; | |
| overflow:hidden; | |
| z-index:1; | |
| } | |
| #accueil{ | |
| background:blue; | |
| max-height:2000px; | |
| transition:3s 0.8s; } | |
| div{ | |
| background:yellow; | |
| } | |
| div:target{max-height:2000px; | |
| transition:max-height 3s 0.8s; | |
| } | |
| div:target ~ div, div:target ~ div#accueil{/*ce qui est censé faire que la contenu de la page d'accueil disparaisse*/ | |
| max-height:0; | |
| transition:0.5s; | |
| } | |
| a:focus{/*ce qui est censé mettre le lien page2 du menu en blanc quand on est sur la page 2*/ | |
| color:white; | |
| } | |
| #i3{background:purple;} | |
| #i4 {background:turquoise;} | |
| div div {background:inherit;} |
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 characters
| <ul> | |
| <li><a href="#" tabindex="0">Accueil</a></li> | |
| <li><a href="#i2" id="actuel2" tabindex="0">page2</a></li> | |
| <li><a href="#i3" tabindex="0">page3</a></li> | |
| <li><a href="#i4" tabindex="0">page4</a></li> | |
| </ul> | |
| <div id="i2"><!--contenu des autres pages--> | |
| <p>div i2 donc la deuxième page</p> | |
| <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p> | |
| </div> | |
| <div id="i3"><!--contenu des autres pages--> | |
| <p>div i3 donc la troisième page</p> | |
| <p>Ceci est un essai de site dont le contenu apparaît en cliquant sur le lien. </p> | |
| <p>Ceci est un essai de site dont le contenu apparaît en cliquant sur le lien. </p> | |
| <p>Ceci est un essai de site dont le contenu apparaît en cliquant sur le lien. </p> | |
| <p>Ceci est un essai de site dont le contenu apparaît en cliquant sur le lien. </p> | |
| <p>Ceci est un essai de site dont le contenu apparaît en cliquant sur le lien. </p> | |
| </div> | |
| <div id="i4"><!--contenu des autres pages--> | |
| <form action="#" method="post"> | |
| <div> | |
| <label for="name">Text Input:</label> | |
| <input type="text" name="name" id="name" value="" tabindex="1" /> | |
| </div> | |
| <div> | |
| <h4>Radio Button Choice</h4> | |
| <label for="radio-choice-1">Choice 1</label> | |
| <input type="radio" name="radio-choice-1" id="radio-choice-1" tabindex="2" value="choice-1" /> | |
| <label for="radio-choice-2">Choice 2</label> | |
| <input type="radio" name="radio-choice-2" id="radio-choice-2" tabindex="3" value="choice-2" /> | |
| </div> | |
| <div> | |
| <label for="select-choice">Select Dropdown Choice:</label> | |
| <select name="select-choice" id="select-choice"> | |
| <option value="Choice 1">Choice 1</option> | |
| <option value="Choice 2">Choice 2</option> | |
| <option value="Choice 3">Choice 3</option> | |
| </select> | |
| </div> | |
| <div> | |
| <label for="textarea">Textarea:</label> | |
| <textarea cols="40" rows="8" name="textarea" id="textarea"></textarea> | |
| </div> | |
| <div> | |
| <label for="checkbox">Checkbox:</label> | |
| <input type="checkbox" name="checkbox" id="checkbox" /> | |
| </div> | |
| <div> | |
| <input type="submit" value="Submit" /> | |
| </div> | |
| </form> | |
| </div> | |
| <div id="accueil"><!--contenu affiché dès qu'on arrive sur la page--> | |
| <p>div accueil</p> | |
| <dl> | |
| <dt>Definition list</dt> | |
| <dd>Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna | |
| aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea | |
| commodo consequat.</dd> | |
| <dt>Lorem ipsum dolor sit amet</dt> | |
| <dd>Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna | |
| aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea | |
| commodo consequat.</dd> | |
| </dl> | |
| </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 characters
| // alert('Hello world!'); |
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 characters
| {"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment