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.
<h1>Hug O’War <small>Shel Silverstein<br><em>Where the Sidewalk Ends</em></small></h1>
<ul>
<li>I will not play at <span class="tug">tug o’ war</span>.</li>
<li>I’d rather play at <span class="hug">hug o’ war</span>,</li>
<li>Where everyone <span class="hug">hugs</span></li>
<li>Instead of <span class="tug">tugs</span>,</li>
<li>Where everyone <span class="giggles"><b>g</b><b>i</b><b>g</b><b>g</b><b>l</b><b>e</b><b>s</b></span></li>
<li>And <span class="roll">rolls</span> on the rug,</li>
<li>Where everyone <span class="kiss">kisses</span>,</li>
<li>And everyone <span class="grin"><b>g</b><b>r</b><b>i</b><b>n</b><b>s</b></span>,</li>
<li>And everyone <span class="cuddle">cuddles</span>,</li>
<li>And everyone <span class="win">wins</span>.</li>
</ul>
@import "compass/css3";
@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,900,300italic);
@import url(https://fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700);
body {
font-size:18px;
line-height:1.7;
color:#222;
background:#fafafa;
font-family: 'Source Sans Pro', sans-serif;
font-weigh:300;
}
h1 {
font-size:4em;
margin-right:1.75em;
font-weight:900;
max-width:2em;
line-height:1.1;
small {
font-size:0.2em;
font-weight:300;
display:block;
margin-top:0.25em;
em {
font-style:italic;
}
}
}
li {
font-family: 'Roboto Slab', serif;
font-weight:300;
}
span {
border-bottom:0.1em dotted darken(#fafafa,15%);
cursor:pointer;
@include transition(all 1s);
&.tug:hover {
font-weight:700;
letter-spacing:0.3em;
@include transition(all 1s);
}
&.hug:hover {
font-weight:700;
letter-spacing:-0.2em;
@include transition(all 1s);
}
&.giggles:hover {
font-weight:700;
b {
animation:giggles 0.25s infinite alternate;
position:relative;
@include transition(all 0.2s);
}
b:nth-child(2n+1) {
animation:giggles 0.5s infinite;
position:relative;
@include transition(all 0.2s);
}
}
&.grin:hover {
position:relative;
top:0.2em;
font-weight:700;
@include transition(all 1s);
b {
position:relative;
@include transition(all 1s);
}
b:nth-child(1), b:nth-child(5) {
top:-0.6em;
}
b:nth-child(2), b:nth-child(4) {
top:-0.25em;
}
}
&.kiss:hover {
@include transition(all 0.5s);
animation:pucker 1s ease-in-out;
}
&.roll, &.grin, &.kiss {display:inline-block;
}
&.roll:hover {
@include transform(rotate(360deg));
@include transition(all 1s);
font-weight:700;
}
&.cuddle:hover {
position:relative;
@include transition(all 1s);
font-weight:700;
animation: cuddle 1s ease-in-out infinite alternate;
}
&.win:hover {
font-weight:700;
@include transition(all 1s);
&:after {
content:"\272D";
position:absolute;
display:block;
width:100%;
color:darken(yellow,25%);
font-size:35em;
top:0;
right:0;
z-index:-1;
opacity:0.1;
line-height:1;
text-align:center;
}
}
}
@-webkit-keyframes pucker
{
0% {
}
90% {
@include transform(scale(1.5));
color:red;
}
95% {
font-weight:700;
}
100% {
}
}
@-webkit-keyframes giggles
{
0% {
top:0.1em;
}
25% {
top:0.15em;
}
50% {
top:-0.1em;
}
75% {
top:-0.05em;
}
100% {
top:0.15em;
}
}
@-webkit-keyframes cuddle
{
from {
left:0;
}
to {
left:0.5em;
letter-spacing:-0.1em;
}
}
Also see: Tab Triggers