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 width="413" height="832" viewBox="0 0 413 832" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7 92.017C8.2049 92.017 9.398 91.7797 10.5112 91.3186C11.6244 90.8575 12.6358 90.1817 13.4878 89.3297C14.3398 88.4777 15.0156 87.4662 15.4767 86.3531C15.9378 85.2399 16.1751 84.0468 16.1751 82.8419C16.1751 81.637 15.9378 80.4439 15.4767 79.3307C15.0156 78.2175 14.3398 77.2061 13.4878 76.3541C12.6358 75.5021 11.6244 74.8263 10.5112 74.3652C9.398 73.9041 8.2049 73.6667 7 73.6667L7 92.017Z" fill="#FB913A" />
<path d="M248.994 292.15L236.378 300.751L236.378 283.548L248.994 292.15Z" fill="#4673D1" />
<path d="M168.712 211.294C169.917 211.294 171.11 211.057 172.223 210.595C173.337 210.134 174.348 209.459 175.2 208.607C176.052 207.755 176.728 206.743 177.189 205.63C177.65 204.517 177.887 203.324 177.887 202.119C177.887 200.914 177.65 199.721 177.189 198.608C176.728 197.494 176.052 196.483 175.2 195.631C174.348 194.779 173.337 194.103 172.223 193.642C171.11 193.181 169.917 192.944 168.712 192.944L168.712 202.119L168.712 211.294Z" fill="#FB913A" />
<path d="M164.124 548.48C165.329 548.48 166.522 548.243 167.636 547.782C168.749 547.321 169.76 546.645 170.612 545.793C171.464 544.941 172.14 543.929 172.601 542.816C173.062 541.703 173.3 540.51 173.299 539.305C173.299 538.1 173.062 536.907 172.601 535.794C172.14 534.681 171.464 533.669 170.612 532.817C169.76 531.965 168.749 531.289 167.636 530.828C166.522 530.367 165.329 530.13 164.124 530.13L164.124 539.305L164.124 548.48Z" fill="#FB913A" />
<path d="M84.9883 282.147C86.1179 283.318 87.4589 284.248 88.9348 284.882C90.4107 285.516 91.9925 285.842 93.59 285.842C95.1875 285.842 96.7693 285.516 98.2452 284.882C99.7211 284.248 101.062 283.318 102.192 282.147L93.59 273.226L84.9883 282.147Z" fill="#4673D1" />
<path d="M170.751 395.548C169.899 396.386 168.932 397.098 167.879 397.664C168.932 398.23 169.899 398.942 170.751 399.78C171.922 400.933 172.852 402.302 173.486 403.808C174.12 405.314 174.446 406.929 174.446 408.559L161.83 408.559L161.83 386.768L174.446 386.768C174.446 388.399 174.12 390.013 173.486 391.52C172.852 393.026 171.922 394.395 170.751 395.548Z" fill="#FF576D" />
<path d="M79.2552 26.644L70.0801 35.8192L79.2552 44.9943L88.4304 35.8192L79.2552 26.644Z" fill="#4673D1" />
<path d="M84.9896 613.853L75.8145 623.028L84.9896 632.204L94.1647 623.028L84.9896 613.853Z" fill="#4673D1" />
<path d="M86.1361 453.288L76.9609 462.463L86.1361 471.638L95.3112 462.463L86.1361 453.288Z" fill="#FF576D" />
<path d="M279.96 381.034L270.785 390.209L279.96 399.384L289.135 390.209L279.96 381.034Z" fill="#51BFE1" />
<path d="M21.9095 338.599L12.7344 347.774L21.9095 356.949L31.0847 347.774L21.9095 338.599Z" fill="#51BFE1" />
<path d="M21.9095 737.718L12.7344 746.893L21.9095 756.068L31.0847 746.893L21.9095 737.718Z" fill="#51BFE1" />
<path d="M73.5195 149.935L86.1354 158.537L86.1354 141.333L73.5195 149.935Z" fill="#FF576D" />
<path d="M104.486 714.206L117.102 722.808L117.102 705.604L104.486 714.206Z" fill="#FF576D" />
<path class="mask" d="M153 2L150.5 21L132.5 36H97.5H37.5L20.5 43L10.5 65V123.5L20.5 145.5L44.5 152H100H153L166.5 162L173 179V207V257.5L166.5 272.5L150.5 281H100H44.5L27.5 297L20.5 312V335V436.5L30.5 454L47.5 462.5H116H254.5L273.5 451L279.5 434V315.5L273.5 297L254.5 292.5H195.5L178 297L166.5 318V599L155.5 618L129.5 623.5H60.5H42.5L27.5 636.5L20.5 653V741V794.5L30.5 811.5L50.5 821.5H87L105.5 809L112 790V703.5" stroke="#181D2C" stroke-width="20" />
<path d="M64.3454 150.509L42.4414 150.509C24.7683 150.509 10.4414 136.182 10.4414 118.509L10.4414 101.192" stroke="#FB913A" stroke-width="1.5" stroke-dasharray="6 6" />
<path d="M21.9096 766.39L21.9096 788.294C21.9096 805.967 36.2364 820.294 53.9096 820.294L79.3672 820.294C97.0403 820.294 111.367 805.967 111.367 788.294L111.367 731.983" stroke="#FB913A" stroke-width="1.5" stroke-dasharray="6 6" />
<path d="M173.299 183.768L173.299 182.509C173.299 164.835 158.972 150.509 141.299 150.509L95.3105 150.509" stroke="#FB913A" stroke-width="1.5" stroke-dasharray="6 6" />
<path d="M111.367 282.401L141.299 282.401C158.973 282.401 173.299 268.074 173.299 250.401L173.299 220.469" stroke="#FB913A" stroke-width="1.5" stroke-dasharray="6 6" />
<path d="M103.34 623.028L135.566 623.028C153.239 623.028 167.566 608.701 167.566 591.028L167.566 557.656" stroke="#FB913A" stroke-width="1.5" stroke-dasharray="6 6" />
<path d="M106.779 462.463L247.96 462.463C265.633 462.463 279.96 448.136 279.96 430.463L279.96 408.559" stroke="#928CDA" stroke-width="1.5" stroke-dasharray="6 6" />
<path d="M21.9102 329.424L21.9102 314.401C21.9102 296.728 36.237 282.401 53.9102 282.401L75.8141 282.401" stroke="#51BFE1" stroke-width="1.5" stroke-dasharray="6 6" />
<path d="M21.9102 728.542L21.9102 655.028C21.9102 637.355 36.237 623.028 53.9102 623.028L66.639 623.028" stroke="#51BFE1" stroke-width="1.5" stroke-dasharray="6 6" />
<path d="M67.7859 462.463L53.9102 462.463C36.237 462.463 21.9102 448.136 21.9102 430.463L21.9102 366.124" stroke="#51BFE1" stroke-width="1.5" stroke-dasharray="6 6" />
<path d="M258.17 292.723V292.723C270.205 292.723 279.961 302.479 279.961 314.514L279.961 371.859" stroke="#928CDA" stroke-width="1.5" stroke-dasharray="6 6" />
<path d="M10.4414 64.4914V64.4914C10.4414 48.6561 23.2784 35.8191 39.1137 35.8191L60.9047 35.8191" stroke="#FF576D" stroke-width="1.5" stroke-dasharray="6 6" />
<path d="M97.6055 35.8191L122.837 35.8191C139.306 35.8191 152.656 22.4686 152.656 5.99988V5.99988" stroke="#FF576D" stroke-width="1.5" stroke-dasharray="6 6" />
<path d="M167.564 417.735L167.564 520.955" stroke="#FB913A" stroke-width="1.5" stroke-dasharray="6 6" />
<path d="M167.564 377.593L167.564 323.576C167.564 305.903 181.891 291.576 199.564 291.576L227.203 291.576" stroke="#51BFE1" stroke-width="1.5" stroke-dasharray="6 6" />
<path class="mask" d="M153 2L150.5 21L132.5 36H97.5H37.5L20.5 43L10.5 65V123.5L20.5 145.5L44.5 152H100H153L166.5 162L173 179V207V257.5L166.5 272.5L150.5 281H100H44.5L27.5 297L20.5 312V335V436.5L30.5 454L47.5 462.5H116H254.5L273.5 451L279.5 434V315.5L273.5 297L254.5 292.5H195.5L178 297L166.5 318V599L155.5 618L129.5 623.5H60.5H42.5L27.5 636.5L20.5 653V741V794.5L30.5 811.5L50.5 821.5H87L105.5 809L112 790V703.5" stroke="#181D2C" stroke-width="6" />
</svg>
body {
background-color: #181d2c;
}
console.clear();
gsap.registerPlugin(DrawSVGPlugin);
let tl = gsap.timeline({
defaults: { ease: "none" },
repeat: -1,
repeatDelay: 1
});
tl.timeScale(2);
tl.fromTo(
".mask",
{
drawSVG: "100% 0%"
},
{
drawSVG: "100% 100%",
duration: 20
}
);
Also see: Tab Triggers