HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
Any URLs added here will be added as <link>
s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
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.
Search for and use JavaScript packages from npm here. By selecting a package, an import
statement will be added to the top of the JavaScript editor for this package.
Using packages here is powered by esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<svg id="AdvertArrow" xmlns="http://www.w3.org/2000/svg" height="200" width="300" viewBox="0 0 300 200.00001">
<g id="layer1" stroke-linejoin="round" stroke="#333" stroke-miterlimit=".2" stroke-width="3">
<path id="AdLine" d="M62.283 174.74h175.43v-1.696l-2.273.213-85.442-.213H62.284z"/>
<path id="AdArrow" d="M62.283 174.74h175.43l.212-39.46 29.55.21-117.48-95.26-117.05 94.624 29.128.424z"/>
</g>
<g fill="#333">
<g id="Ahead">
<path id="AheadA" d="M184.45 124.14l-1.57-21.826h-7.128l-1.572 21.827h-5.088l6.772-86.84h6.903l6.79 86.84h-5.106zm-2.525-36.084l-1.46-20.113q-.13-1.834-.598-9.17-.45-7.393-.542-9.878-.243 5.087-.617 11.24-.375 6.093-1.946 27.92h5.163z"/>
<path id="AheadH" d="M208.902 124.14h-5.09V86.224h-6.715v37.918h-5.088V37.658h5.08v34.37h6.71v-34.37h5.09v86.484z"/>
<path id="AheadE" d="M226.037 124.14h-12.33V37.658h12.33v13.9h-7.24v20.588h6.716v13.96h-6.716v23.958h7.24v14.08z"/>
<path id="AheadA2" d="M242.963 124.14l-1.57-21.826h-7.13l-1.57 21.827h-5.09l6.774-86.84h6.902l6.79 86.84h-5.11zm-2.525-36.084l-1.456-20.113q-.13-1.834-.6-9.17-.448-7.393-.54-9.878-.244 5.087-.62 11.24-.373 6.093-1.944 27.92h5.163z"/>
<path id="AheadD" d="M267.92 80.07q0 21.415-2.768 32.773-2.75 11.298-7.932 11.298h-6.698V37.66h7.315q4.77 0 7.427 11.18 2.656 11.12 2.656 31.234zm-5.22.474q0-28.987-5.05-28.987h-2.04v58.505h1.647q2.788 0 4.116-7.335 1.328-7.395 1.328-22.183z"/>
</g>
<g id="GettingOriginal">
<path id="GettingG" d="M36.958 75.828h7.665v44.04q-3.258 4.757-6.928 4.757-4.373 0-6.74-11.392-2.35-11.392-2.35-32.826 0-20.67 2.693-32.356 2.71-11.68 7.563-11.68 3.01 0 5.73 5.29l-1.47 13.03q-2.12-4.22-3.98-4.22-2.65 0-4.21 8.16-1.54 8.11-1.54 22.14 0 14.45 1.12 22.14 1.13 7.69 3.278 7.69 1.13 0 2.298-1V89.92h-3.1V75.827z"/>
<path id="GettingE" d="M58.39 123.45h-11.3V37.6h11.3v13.8h-6.635v20.436h6.156v13.858h-6.15v23.783h6.64v13.976z"/>
<path id="GettingT" d="M68.39 123.45h-4.65V51.635h-4.8V37.6h14.25v14.034h-4.8v71.817z"/>
<path id="GettingT2" d="M82.196 123.45H77.55V51.635h-4.803V37.6H87v14.034h-4.803v71.817z"/>
<path id="GettingI" d="M89.14 123.45V37.6h4.39v85.85h-4.39z"/>
<path id="GettingN" d="M115.07 123.45h-5.694l-7.752-62.185h-.223q.43 7.105.43 15.268v46.918h-4.32V37.6h5.73l7.69 61.54h.19q-.32-6.165-.32-14.68V37.6h4.29v85.852z"/>
<path id="GettingG2" d="M125.753 75.828h7.666v44.04q-3.26 4.757-6.93 4.757-4.38 0-6.74-11.392-2.35-11.392-2.35-32.826 0-20.67 2.69-32.356 2.71-11.68 7.56-11.68 3 0 5.72 5.29L131.9 54.7q-2.126-4.227-3.98-4.227-2.656 0-4.217 8.16-1.545 8.103-1.545 22.14 0 14.443 1.114 22.135 1.133 7.692 3.277 7.692 1.13 0 2.29-.998V89.92h-3.11V75.827z"/>
</g>
<g id="GettingMorph">
<path id="MorphG" d="M64.19 63.774l17.788-5.965v25.45c-4.245 4.96-9.38 9.78-15.683 14.51-8.993 6.74-17.36 9.76-24.2 7.7C34.32 103.09 30 94.48 30 79.91c0-14.052 4.926-25.865 13.658-34.35C51.203 38.27 60.103 35 69.42 35c4.86 0 8.97 1.073 12.5 3.06l-2.83 7.98c-2.95-1.31-5.94-1.834-8.96-1.473-4.76.57-8.96 3.12-12.35 7.87-3.616 5.08-5.532 11.662-5.532 19.44 0 8 1.39 13.4 4.06 16.093 2.56 2.523 6.03 2.322 10.19-.3 2.04-1.29 4.014-2.758 5.92-4.394V70.31L64.2 74.05V63.78"/>
<path id="MorphE" d="M100.435 71.68l-14.2 10.507v-46.52l14.2-.148v5.81l-7.457.95v9.9l6.984-2.11v5.89l-6.984 2.93v11.53l7.457-4.64v5.88"/>
<path id="MorphT" d="M108.59 65.643l-3.43 2.54V40.817l-4.198.544v-5.84l10.662-.11v4.58l-3.034.4v25.27"/>
<path id="MorphT2" d="M116.258 59.968l-2.243 1.66v-21.96l-2.654.344v-4.608l6.94-.073v3.78l-2.04.27v20.59"/>
<path id="MorphI" d="M119.133 57.84V35.322l1.578-.016v21.366l-1.57 1.168"/>
<path id="MorphN" d="M126.58 52.327l-1.31.97-2.04-12.635-.063.014c.08 1.06.122 2.204.122 3.44v10.647l-1.29.95v-20.42l1.68-.018 1.95 12.717.04-.024c-.05-.824-.08-1.825-.08-3v-9.713l.97-.01v17.082"/>
<path id="MorphG2" d="M128.7 42.14l1.297-.434v7.485c-.352.8-.74 1.37-1.166 1.69-.53.4-.96.01-1.27-1.21-.32-1.26-.48-3.29-.48-6.08 0-2.68.19-4.81.55-6.35.35-1.49.83-2.22 1.41-2.22.35 0 .66.31.96.9l-.23 2.26c-.23-.45-.45-.67-.67-.64-.31.038-.56.565-.76 1.595-.19 1.04-.29 2.44-.29 4.187 0 1.8.07 3.14.22 4.01.14.86.34 1.208.6 1.045.13-.083.27-.226.4-.43v-3.47l-.54.25v-2.55"/>
</g>
<g id="AheadMorph">
<path id="MorphA" d="M171.04 52.23l-.298-4.53-1.432-.808-.334 3.78-.89-.672 1.372-15h1.394l1.373 18.13-1.186-.898m-.48-7.408l-.27-3.976c-.02-.238-.05-.83-.11-1.773-.05-.944-.08-1.572-.09-1.886-.04.63-.09 1.33-.15 2.09-.06.75-.2 2.45-.44 5.08l1.04.45"/>
<path id="MorphH" d="M178.113 57.578l-1.812-1.37.1-9.273-2.08-.884-.08 8.59-1.38-1.04.19-18.51 1.39.01-.08 7.76 2.09.63.09-8.38 1.82.01-.22 22.49"/>
<path id="MorphE2" d="M186.42 63.853l-6.363-4.808.228-23.947 6.387.02-.04 4.607-4.025-.496-.057 6.11 3.7 1.11-.042 4.6-3.696-1.57-.067 7.13 4.015 2.53-.04 4.69"/>
<path id="MorphA2" d="M200.87 74.777l-1.713-11.04-6.788-3.83-1.33 7.44-3.63-2.74L192.66 35h6.58l8.41 44.904-6.78-5.128m-2.69-17.81l-1.43-9.113c-.084-.535-.27-1.86-.56-3.96-.27-2.083-.434-3.46-.49-4.145-.16 1.37-.367 2.87-.61 4.494-.245 1.593-.86 5.164-1.825 10.565l4.912 2.16"/>
<path id="MorphD" d="M267.324 79.103c0 14.817-5.3 23.058-14.615 24.488-7.87 1.22-17.33-2.73-27.22-10.2l-13.92-10.52.29-47.67 15.49.05c9.36.03 18.34 3.19 25.96 10.22 8.93 8.2 14 19.77 14 33.65m-24.78-8.79c.04-15.81-5.86-24.43-15.72-25.64l-4.97-.61-.19 37.37 3.97 2.51c5.03 3.18 9.19 3.956 12.11 1.91 3.12-2.22 4.77-7.435 4.8-15.525"/>
</g>
</g>
</svg>
svg {
display: block;
margin: 0 auto;
overflow: visible;
}
body {
text-align:center;
background: white;
color:#ccc;
font-family:Asap, 'sans-serif';
}
button {
padding:6px;
font-size:22px;
}
.nav{
margin:30px;
font-size:18px;
}
TweenLite.set([MorphG, MorphE, MorphT, MorphT2, MorphI, MorphN, MorphG2, MorphA, MorphH, MorphE2, MorphA2, MorphD], {
autoAlpha: 0
});
var BookAdvertTL = new TimelineMax({
paused: false,
repeat: -1,
repeatDelay: 1
});
BookAdvertTL
.to("#GettingG", 1, {
morphSVG:{
shape:"#MorphG"
}
}, 0)
.to("#GettingE", 1, {
morphSVG:{
shape:"#MorphE"
}
}, 0)
.to("#GettingT", 1, {
morphSVG:{
shape:"#MorphT"
}
}, 0)
.to("#GettingT2", 1, {
morphSVG:{
shape:"#MorphT2"
}
}, 0)
.to("#GettingI", 1, {
morphSVG:{
shape:"#MorphI"
}
}, 0)
.to("#GettingN", 1, {
morphSVG:{
shape:"#MorphN",
shapeIndex: 0
}
}, 0)
.to("#GettingG2", 1, {
morphSVG:{
shape:"#MorphG2"
}
}, 0)
.to("#AheadA", 1, {
morphSVG:{
shape:"#MorphA"
}
}, 0)
.to("#AheadH", 1, {
morphSVG:{
shape:"#MorphH"
}
}, 0)
.to("#AheadE", 1, {
morphSVG:{
shape:"#MorphE2"
}
}, 0)
.to("#AheadA2", 1, {
morphSVG:{
shape:"#MorphA2"
}
}, 0)
.to("#AheadD", 1, {
morphSVG:{
shape:"#MorphD"
}
}, 0);
//comment out next line to disable findShapeIndex() UI
//findShapeIndex("#GettingN", "#MorphN");
Also see: Tab Triggers