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.
<div class="wrapper">
<div class="items">
<a href="#" class="link link1">one</a>
<a href="#" class="link link2">two</a>
<a href="#" class="link link3">three</a>
</div>
<a href="http://maxmiracolo.com" class="logo" target="_blank">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
<path d="M48.9 79.3c-.1-.4-.5-8.2-.8-17.3l-.6-16.5-2.3 8.9c-1.2 4.8-3.2 11-4.3 13.7-1.9 4.3-2.5 4.9-5 4.9-3.8 0-4.6-2.2-6.6-16.5C27.6 43.3 27.2 41.9 26 44c-.9 1.7-7.7 28.2-8.2 32-.4 3-3.5 3.4-5.2.7-.9-1.3-.1-5.7 3.5-20C21.6 35.4 24.9 27 27.9 27s3.6 2 6.2 18.8c1.3 8.4 2.6 14.7 3 14 .4-.7 2.1-7.1 3.8-14.3C45.7 25.7 46.7 23 49.5 23c1.2 0 2.6.7 2.9 1.6s.9 7.7 1.3 15.2l.6 13.6L57 45c3.4-10.9 4.8-13.2 8-12.8 3.1.4 3.8 2.8 3.9 14.7.1 5.2.4 9.2.7 8.8.3-.3 1.6-5.4 2.9-11.4 2.5-11.9 5.8-21.5 8-23.3.8-.6 2.4-1 3.7-.8l2.3.3v56l-2.2.3c-1.3.2-2.5-.4-3.1-1.5-.5-1-.9-9.8-.8-19.5 0-9.7 0-17.5-.2-17.3-.1.1-1.4 6-2.7 13.1-3 15.7-4.1 19.1-6.4 20.4-4 2.1-6.6-3.3-7.9-16l-.8-7.5L59.7 59c-5.7 21.9-5.2 20.5-8.1 20.8-1.4.2-2.7 0-2.7-.5z"/>
</svg>
</a>
</div>
/***********************
* IMPORTS
* VARIABLES
* MIXINS
***********************/
@import url('https://fonts.googleapis.com/css?family=Megrim');
$link1color: cyan;
$link2color: yellow;
$link3color: magenta;
@mixin neonAnimation($color) {
0%, 11%, 13%, 17%, 19%, 100% {
text-shadow: 0px 0px 15px $color;
}
12%, 18% {
text-shadow: 0 0 0px #fff;
}
}
@mixin newKeyframes($animationName) {
@-webkit-keyframes #{$animationName} {
@content;
}
@keyframes #{$animationName} {
@content;
}
}
/***********************
* STRUCTURAL
***********************/
.wrapper {
align-items: center;
background-color: #111;
display: flex;
flex-direction: column;
height: 100vh;
justify-content: center;
width: 100vw;
}
.items {
display: inline-block;
position: relative;
text-align: center;
}
/***********************
* LINK VARIABLES
***********************/
.link1 {
--animation: neon1;
--color: #{$link1color};
--radial-bg: radial-gradient( #{transparentize($link1color, .8)} 10%, transparent 45%);
}
.link2 {
--animation: neon2;
--color: #{$link2color};
--radial-bg: radial-gradient( #{transparentize($link2color, .8)} 10%, transparent 45%);
}
.link3 {
--animation: neon3;
--color: #{$link3color};
--radial-bg: radial-gradient( #{transparentize($link3color, .8)} 20%, transparent 60%);
}
/***********************
* LINK
***********************/
.link {
color: var(--color);
display: block;
font-family: 'Megrim', cursive;
font-size: 60px;
letter-spacing: 2px;
opacity: .6;
position: relative;
text-decoration: none;
text-transform: uppercase;
transition: 130ms cubic-bezier(.4, 1, .8, 1.8);
z-index: 1;
&::before {
bottom: 50%;
content: '';
left: 50%;
position: absolute;
right: 50%;
top: 50%;
z-index: -1;
}
&:hover {
animation: var(--animation) 2s forwards;
letter-spacing: 10px;
text-indent: 10px;
opacity: 1;
&::before {
background: var(--radial-bg);
bottom: -50%;
left: -50%;
pointer-events: none;
right: -50%;
top: -50%;
}
}
}
/***********************
* ANIMATIONS
***********************/
@include newKeyframes(neon1) {
@include neonAnimation($link1color);
};
@include newKeyframes(neon2) {
@include neonAnimation($link2color);
};
@include newKeyframes(neon3) {
@include neonAnimation($link3color);
};
/***********************
* LOGO
***********************/
.logo {
position: absolute;
top: 10px;
right: 10px;
width: 40px;
height: 40px;
svg {
fill: rgba(255,255,255,.1);
transition: 200ms;
}
&:hover {
svg {
transform: rotate(360deg);
fill: rgba(255,255,255,.4);
}
}
}
Also see: Tab Triggers