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.
.circle
.inner
.full
.semi-wrap
.semi-r.yellow.appear
.semi-r.yellow
.semi-t.red.appear
.semi-t.red
.semi-t
@import "compass/css3";
// Variables
$blue : #2552d9;
$green : #1f9343;
$red : #d7282a;
$yellow : #fcd800;
$duration : 2s;
$edge-size : 150px;
body{
background: #f7f7ee;
}
.circle{
width: $edge-size;
height:$edge-size;
position: absolute;
top: 40%; left: 50%;
margin-top: -75px;
margin-left: -75px;
@include box-shadow(1px 1px 20px #666);
@include border-radius(100px);
}
.inner{
position: relative;
width: 100%;
height: 100%;
.full{
background: $green;
width: 100%;
height: 100%;
border-radius: 100%;
z-index: 1;
}
.semi-wrap{
height: 100%;
width: 100%;
position: absolute; top: 0; left: 0;
z-index: 10;
.semi-t{
position: absolute; top: 0; left: 0;
background: $blue;
width: 100%;
height: 50%;
@include border-radius(100px 100px 0 0px);
@include transform-origin(100%, 100%);
-webkit-animation: fold-up $duration infinite;
&.red{
opacity: 0;
background: $red;
-webkit-animation: fold-down $duration infinite;
}
&.red.appear{
opacity: 0;
background: $red;
-webkit-animation: top-appear $duration infinite;
}
}
.semi-r{
position: absolute; top: 0; right: 0;
background: $blue;
width: 50%;
height: 100%;
@include border-radius(0 100px 100px 0);
@include transform-origin(0%, 0%);
z-index: 30;
&.yellow{
background: $yellow - 30;
-webkit-animation: fold-left $duration infinite;
}
&.yellow.appear{
opacity: 0;
background: $yellow;
-webkit-animation: right-appear $duration infinite;
}
}
}
}
// Animations
@-webkit-keyframes fold-up{
0% { @include transform( rotateX(180deg) ) }
25% { @include transform( rotateX(0deg) ); opacity: 1 }
26% { opacity: 0 }
100% { opacity: 0; }
}
@-webkit-keyframes fold-down{
0%, 25% { @include transform( rotateX(0deg) ); opacity: 0 }
26% { opacity: 1; background: $red - 500 }
50% { @include transform( rotateX(180deg) ); opacity: 1; background: $red; }
100% { @include transform( rotateX(180deg) ); opacity: 1 }
}
@-webkit-keyframes top-appear{
0%, 25% { opacity: 0 }
26% { opacity: 1 }
100% { opacity: 1 }
}
@-webkit-keyframes fold-left{
0%, 50% { opacity: 0 }
51% { @include transform( rotateY(0deg) ); background: $yellow - 100; opacity: 1 }
100% { @include transform( rotateY(180deg) ); background: $yellow; opacity: 1 }
}
@-webkit-keyframes right-appear{
0%, 50% { opacity: 0 }
51% { opacity: 1 }
100% { opacity: 1 }
}
/*
+-+-+-+-+-+-+ +-+-+
|L|o|a|d|e|r| |i|n|
+-+-+-+-+-+-+-+-+-+ +-+-+-+
|G|m|a|i|l| |i|O|S| |A|p|p|
+-+-+-+-+-+ +-+-+-+ +-+-+-+
Follow me on twitter:
@brianmgonzalez
*/
Also see: Tab Triggers