JavaScript preprocessors can help make authoring JavaScript easier and more convenient. For instance, CoffeeScript can help prevent easy-to-make mistakes and offer a cleaner syntax and Babel can bring ECMAScript 6 features to browsers that only support ECMAScript 5.
Any URL's added here will be added as <script>
s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
HTML Settings
Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
<article>
<div class="entry-thumb static">
<div class="part part-1"></div>
<div class="part part-2"></div>
<div class="part part-3"></div>
<div class="part part-4"></div>
</div>
</article>
<article>
<div class="entry-thumb four">
<div class="part part-1"></div>
<div class="part part-2"></div>
<div class="part part-3"></div>
<div class="part part-4"></div>
</div>
</article>
<article>
<div class="entry-thumb three">
<div class="part part-1"></div>
<div class="part part-2"></div>
<div class="part part-3"></div>
<div class="part part-4"></div>
</div>
</article>
<article>
<div class="entry-thumb two">
<div class="part part-1"></div>
<div class="part part-2"></div>
<div class="part part-3"></div>
<div class="part part-4"></div>
</div>
</article>
<article>
<div class="entry-thumb one">
<div class="part part-1"></div>
<div class="part part-2"></div>
<div class="part part-3"></div>
<div class="part part-4"></div>
</div>
</article>
@import "compass/css3";
html,body{min-height:100%;}
article{
width:1024px;
height:768px;
background:transparent;
left:50%;
position:absolute;
top:50%;
transform:translate(-50%,-50%);
vertical-align:middle;
}
.entry-thumb{
height:100%;
position:relative;
perspective:1200px;
.part{
background-size:cover;
width:100%;
height:192px;
position:relative;
z-index:100;
&:nth-child(odd) {
transform-origin: top;
}
&:nth-child(even) {
transform-origin: bottom;
}
}
&.one{
.part:nth-child(odd){animation:fold-odd1 6s infinite normal linear;}
.part:nth-child(even){animation:fold-even1 6s infinite normal linear;}
}
&.two{
.part:nth-child(odd){animation:fold-odd2 6s infinite normal linear;}
.part:nth-child(even){animation:fold-even2 6s infinite normal linear;}
}
&.three{
.part:nth-child(odd){animation:fold-odd3 6s infinite normal linear;}
.part:nth-child(even){animation:fold-even3 6s infinite normal linear;}
}
&.four{
.part:nth-child(odd){animation:fold-odd4 6s infinite normal linear;}
.part:nth-child(even){animation:fold-even4 6s infinite normal linear;}
}
&.static,
&.one{.part{background:url('http://awampk.com/wp-content/uploads/2013/02/Beautiful-Nature-Landscapes-Wallpapers1.jpeg') no-repeat;}}
&.two{.part{background:url('http://www.deshow.net/d/file/travel/2009-10/earths-treasures-725-2.jpg') no-repeat;}}
&.three{.part{background:url('http://webtaj.com/images/beautiful-animated-landscapes-computer-deskstop_190235.jpg') no-repeat;}}
&.four{.part{background:url('https://lh3.ggpht.com/-aIOkymCTSPk/UP2RACbmHDI/AAAAAAAAtQI/qt00V9uf8s8/s1600/free-beautiful-landscape-desktop-wallpaper-06-2010_1024x768_81785.jpg') no-repeat;}}
}
.part-2 {
background-position:0 -192px!important;
}
.part-3 {
background-position:0 -384px!important;
}
.part-4 {
background-position:0 -576px!important;
}
@keyframes fold-odd1{
0%{opacity:1;transform:rotateX(0deg);}
23%{opacity:1;}
25%{opacity:0;transform:rotateX(90deg);}
100%{opacity:0;transform:rotateX(90deg);}
}
@keyframes fold-even1{
0%{opacity:1;transform:rotateX(0);margin-top:0px;}
5%{margin-top:-19px}
10%{margin-top:-75px}
15%{margin-top:-176px}
20%{margin-top:-265px}
23%{opacity:1;}
25%{opacity:0;transform:rotateX(-90deg);margin-top:-384px;}
100%{opacity:0;transform:rotateX(-90deg);margin-top:-384px;}
}
@keyframes fold-odd2{
0%{opacity:0;transform:rotateX(0deg);}
2%{opacity:1;}
25%{opacity:1;transform:rotateX(0deg);}
48%{opacity:1;}
50%{opacity:0;transform:rotateX(90deg);}
100%{opacity:0;transform:rotateX(90deg);}
}
@keyframes fold-even2{
0%{opacity:0;transform:rotateX(0);margin-top:0px;}
2%{opacity:1;}
25%{opacity:1;transform:rotateX(0);margin-top:0px;}
30%{margin-top:-19px}
35%{margin-top:-75px}
40%{margin-top:-176px}
45%{margin-top:-265px}
48%{opacity:1;}
50%{opacity:0;transform:rotateX(-90deg);margin-top:-384px;}
100%{opacity:0;transform:rotateX(-90deg);margin-top:-384px;}
}
@keyframes fold-odd3{
0%{opacity:0;transform:rotateX(0deg);}
4%{opacity:1;}
50%{opacity:1;transform:rotateX(0deg);}
73%{opacity:1;}
75%{opacity:0;transform:rotateX(90deg);}
100%{opacity:0;transform:rotateX(90deg);}
}
@keyframes fold-even3{
0%{opacity:0;transform:rotateX(0);margin-top:0px;}
4%{opacity:1;}
50%{opacity:1;transform:rotateX(0);margin-top:0px;}
55%{margin-top:-19px}
60%{margin-top:-75px}
65%{margin-top:-176px}
70%{margin-top:-265px}
73%{opacity:1;}
75%{opacity:0;transform:rotateX(-90deg);margin-top:-384px;}
100%{opacity:0;transform:rotateX(-90deg);margin-top:-384px;}
}
@keyframes fold-odd4{
0%{opacity:0;transform:rotateX(0deg);}
4%{opacity:1;}
75%{transform:rotateX(0deg);}
98%{opacity:1;}
100%{opacity:0;transform:rotateX(90deg);}
}
@keyframes fold-even4{
0%{opacity:0;transform:rotateX(0);margin-top:0px;}
4%{opacity:1;}
75%{opacity:1;transform:rotateX(0);margin-top:0px;}
80%{margin-top:-19px}
85%{margin-top:-75px}
90%{margin-top:-176px}
95%{margin-top:-265px}
98%{opacity:1;}
100%{opacity:0;transform:rotateX(-90deg);margin-top:-384px;}
}
Also see: Tab Triggers