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='shape' width="645" height="595" viewBox="0 0 645 595" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Frame 1">
<rect width="645" height="595" fill="white"/>
<path id="end" d="M581.45 127.426C595.623 141.565 595.623 164.526 581.45 178.664L291.197 468.219C277.024 482.357 254.008 482.357 239.836 468.219L94.7089 323.441C80.5364 309.303 80.5364 286.342 94.7089 272.204C108.881 258.065 131.898 258.065 146.07 272.204L265.573 391.306L530.202 127.426C544.375 113.288 567.391 113.288 581.563 127.426H581.45Z" fill="#47CB54"/>
<g id="star">
<path id="start-q" d="M476.775 174.893C472.402 173.645 468.411 171.324 465.164 168.141C461.918 164.958 459.518 161.013 458.185 156.666C450.783 131.575 438.366 108.246 421.687 88.092C405.008 67.938 384.414 51.3774 361.15 39.4125C337.886 27.4476 312.436 20.327 286.341 18.4817C260.245 16.6364 234.047 20.1048 209.331 28.6769C184.615 37.249 161.895 50.7466 142.546 68.353C123.196 85.9593 107.621 107.308 96.7608 131.108C85.9008 154.908 79.9824 180.664 79.3639 206.817C78.7453 232.97 83.4393 258.977 93.1619 283.264C95.3954 288.375 95.8763 294.081 94.5297 299.494C93.183 304.906 90.0845 309.722 85.7164 313.191C66.4675 327.477 51.4391 346.702 42.2218 368.83C33.0045 390.959 29.9412 415.167 33.3561 438.894C38.6853 470.97 55.3378 500.072 80.2913 520.918C105.245 541.764 136.845 552.973 169.357 552.511H297.889C304.3 552.511 310.449 549.964 314.983 545.43C319.516 540.897 322.063 534.748 322.063 528.337C322.063 521.926 319.516 515.777 314.983 511.243C310.449 506.71 304.3 504.163 297.889 504.163H169.357C148.478 504.67 128.108 497.68 111.939 484.46C95.7701 471.24 84.872 452.665 81.2201 432.101C78.9042 416.986 80.7811 401.525 86.6464 387.404C92.5117 373.282 102.14 361.041 114.483 352.014C127.448 342.324 136.826 328.602 141.145 313.003C145.464 297.404 144.478 280.812 138.343 265.834C126.211 233.797 125.587 198.54 136.578 166.094C145.358 140.677 161.08 118.227 181.964 101.286C202.847 84.3461 228.058 73.5928 254.739 70.2447C260.928 69.4479 267.161 69.0442 273.401 69.036C304.659 68.9329 335.11 78.9576 360.193 97.6091C385.277 116.261 403.644 142.535 412.545 172.5C416.02 183.918 422.28 194.294 430.762 202.691C439.244 211.089 449.681 217.245 461.134 220.605C489.164 228.895 513.992 245.55 532.295 268.339C550.597 291.129 561.502 318.966 563.547 348.124C565.593 377.282 558.682 406.368 543.74 431.49C528.799 456.612 506.539 476.57 479.942 488.692C476.005 490.707 472.715 493.789 470.445 497.584C468.175 501.38 467.018 505.737 467.105 510.158C467.058 514.158 468.017 518.106 469.893 521.639C471.769 525.173 474.502 528.178 477.842 530.38C481.182 532.582 485.021 533.909 489.008 534.241C492.995 534.572 497.001 533.897 500.658 532.277C600.593 484.244 654.887 357.888 570.279 235.811C546.982 205.422 513.985 183.924 476.775 174.893Z" fill="#0388A5"/>
<path id="arrow" d="M484.196 400.385C488.728 395.852 491.274 389.705 491.274 383.295C491.274 376.884 488.728 370.737 484.196 366.204L445.857 327.864C432.257 314.269 413.814 306.631 394.584 306.631C375.354 306.631 356.911 314.269 343.312 327.864L304.972 366.204C300.569 370.763 298.132 376.869 298.187 383.207C298.242 389.546 300.785 395.609 305.267 400.091C309.749 404.573 315.812 407.115 322.15 407.17C328.488 407.225 334.595 404.789 339.154 400.385L370.41 369.129V552.511C370.41 558.922 372.957 565.071 377.491 569.604C382.024 574.137 388.173 576.684 394.584 576.684C400.995 576.684 407.144 574.137 411.678 569.604C416.211 565.071 418.758 558.922 418.758 552.511V369.129L450.015 400.385C454.548 404.917 460.695 407.463 467.105 407.463C473.515 407.463 479.663 404.917 484.196 400.385Z" fill="#0388A5"/>
</g>
</g>
</svg>
#end {
visibility: hidden;
}
var tl = gsap.timeline();
tl.to('#arrow', {morphSVG: '#end', duration: 1})
.to("#start-q", {autoAlpha: 0, ease: "none"}, 0)
Also see: Tab Triggers