Created
December 2, 2012 16:23
-
-
Save pawelmhm/4189575 to your computer and use it in GitHub Desktop.
Simple way to animate content
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
/*Dynamic content system */ | |
#view { | |
position:relative; | |
width:900px; | |
height:200px; | |
margin:auto; | |
border:5px dashed #000; | |
overflow:hidden;} | |
#holder { | |
position:absolute; | |
width:0px; | |
height:0px; | |
-webkit-transition: 2s all linear;} | |
.panel { | |
width:880px; | |
height:180px; | |
position:absolute; | |
overflow:hidden; | |
padding:10px;} | |
#panel1 { | |
background:blue; | |
top:0px; | |
left:0px;} | |
#panel2 { | |
background:red; | |
top:200px; | |
left:900px;} | |
#loadpanel2:target #holder { | |
-webkit-transform: translateX(-900px) translateY(-200px);} |
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
<ol> | |
<li><a href="#loadpanel1">Load Panel 1</a></li> | |
<li><a href="#loadpanel2">Load Panel 2</a></li> | |
</ol> | |
<div id="view"> | |
<div id="loadpanel1"> | |
<div id="loadpanel2"> | |
<div id="holder"> | |
<div id="panel1" class="panel">Welcome to panel 1 | |
</div> | |
<div id="panel2" class="panel"> | |
</div> | |
</div> | |
</div> | |
</div> | |
</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":"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