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 xmlns="http://www.w3.org/2000/svg" version="1.1" x="0" y="0" width="640" height="1136" viewBox="0 0 640 1136" xml:space="preserve" enable-background="new 0 0 640 1136">
<style type="text/css" class="svg">
.st0{opacity:0.25;}
.st1{fill:#545454;}
.st2{opacity:0.25;fill:#545454;}
.st3{fill:#7AC943;}
</style>
<path id="dollarBOTTOM" class="st1" d="M401.2 792.8l157.6 68.8L242.9 999.1 84.7 931 401.2 792.8zM401.2 786.2L69.5 931l173.4 74.6 331-144L401.2 786.2zM401.5 795.8L94.1 929l149 64.6 307.6-133.4L401.5 795.8zM416.1 911l-145.8 63.2c-22.1-7-55.3-0.5-55.3-0.5L138.1 941c16.6-12.1 0-23.6 0-23.6l84.4-37.2 151.8-65.8c25.6 11.1 54.8 0.5 54.8 0.5l76.9 32.9c-15.1 11.6 1.3 23.6 1.3 23.6L416.1 911"/>
<path id="dollarBOTTOM" class="st2" d="M322.3 851.1c-14.7 0-28.7 1.4-41.3 3.8l-51.6 22.4c-5.4 5.3-8.3 11.2-8.3 17.3 0 24 45.3 43.5 101.3 43.5 13.9 0 27.2-1.2 39.2-3.4l54.5-23.7c4.8-5.1 7.5-10.6 7.5-16.4C423.6 870.5 378.3 851.1 322.3 851.1M385.7 889.2c-0.3 1.7-1.5 3.5-3.8 5.4 -2.2 1.9-5.5 3.9-9.8 6l10.2 3.5 -12.8 5.2 -10-3.4c-5.7 2.1-11.2 3.9-16.7 5.2 -5.4 1.3-10.8 2.5-16.1 3.4l-13.3-6c5.4-0.8 11-1.9 16.9-3.3 5.9-1.4 11.8-3.3 17.7-5.7 4.3-1.8 6.9-3.4 7.8-5 0.9-1.6 0.2-2.7-2.1-3.5 -2.3-0.8-5.3-1-9.3-0.5 -3.9 0.4-9.3 1.5-16.2 3.2 -12.2 3-22.8 4.9-31.9 5.6 -9.1 0.7-16.6 0.1-22.6-1.9 -5.8-2-8.4-4.7-7.7-8 0.7-3.4 5-7 12.9-10.8l-10.5-3.6 12.8-5.2 10.2 3.5c4.9-1.8 9.4-3.3 13.6-4.4 4.2-1.1 8.2-2.1 12.2-2.9l13.3 6c-4.2 0.7-8.9 1.8-14.2 3.2 -5.2 1.4-10.2 3.1-14.8 5 -3.9 1.6-6.1 3-6.8 4.3 -0.6 1.3 0 2.3 2 2.9 1.9 0.6 4.5 0.8 8 0.4 3.5-0.4 8.7-1.4 15.5-3.1 12.3-3.1 23.4-5 33.2-5.7 9.8-0.7 17.6-0.1 23.5 1.9 3.1 1.1 5.4 2.3 6.9 3.7C385.4 886 386 887.5 385.7 889.2M240.1 939.6c0 5.1-9.7 9.3-21.7 9.3 -12 0-21.7-4.2-21.7-9.3 0-5.1 9.7-9.3 21.7-9.3C230.4 930.3 240.1 934.4 240.1 939.6M445.1 851.6c0 5.1-9.7 9.3-21.7 9.3 -12 0-21.7-4.2-21.7-9.3 0-5.1 9.7-9.3 21.7-9.3C435.4 842.3 445.1 846.4 445.1 851.6"/>
<path id="dollarTOP" class="st1" d="M401.2 269.8l157.6 68.8L242.9 476.1 84.7 408 401.2 269.8zM401.2 263.2L69.5 408l173.4 74.6 331-144L401.2 263.2zM401.5 272.8L94.1 406l149 64.6 307.6-133.4L401.5 272.8zM416.1 388l-145.8 63.2c-22.1-7-55.3-0.5-55.3-0.5L138.1 418c16.6-12.1 0-23.6 0-23.6l84.4-37.2 151.8-65.8c25.6 11.1 54.8 0.5 54.8 0.5l76.9 32.9c-15.1 11.6 1.3 23.6 1.3 23.6L416.1 388"/>
<path id="dollarTOP" class="st2" d="M322.3 328.1c-14.7 0-28.7 1.4-41.3 3.8l-51.6 22.4c-5.4 5.3-8.3 11.2-8.3 17.3 0 24 45.3 43.5 101.3 43.5 13.9 0 27.2-1.2 39.2-3.4l54.5-23.7c4.8-5.1 7.5-10.6 7.5-16.4C423.6 347.5 378.3 328.1 322.3 328.1M385.7 366.2c-0.3 1.7-1.5 3.5-3.8 5.4 -2.2 1.9-5.5 3.9-9.8 6l10.2 3.5 -12.8 5.2 -10-3.4c-5.7 2.1-11.2 3.9-16.7 5.2 -5.4 1.3-10.8 2.5-16.1 3.4l-13.3-6c5.4-0.8 11-1.9 16.9-3.3 5.9-1.4 11.8-3.3 17.7-5.7 4.3-1.8 6.9-3.4 7.8-5 0.9-1.6 0.2-2.7-2.1-3.5 -2.3-0.8-5.3-1-9.3-0.5 -3.9 0.4-9.3 1.5-16.2 3.2 -12.2 3-22.8 4.9-31.9 5.6 -9.1 0.7-16.6 0.1-22.6-1.9 -5.8-2-8.4-4.7-7.7-8 0.7-3.4 5-7 12.9-10.8l-10.5-3.6 12.8-5.2 10.2 3.5c4.9-1.8 9.4-3.3 13.6-4.4 4.2-1.1 8.2-2.1 12.2-2.9l13.3 6c-4.2 0.7-8.9 1.8-14.2 3.2 -5.2 1.4-10.2 3.1-14.8 5 -3.9 1.6-6.1 3-6.8 4.3 -0.6 1.3 0 2.3 2 2.9 1.9 0.6 4.5 0.8 8 0.4 3.5-0.4 8.7-1.4 15.5-3.1 12.3-3.1 23.4-5 33.2-5.7 9.8-0.7 17.6-0.1 23.5 1.9 3.1 1.1 5.4 2.3 6.9 3.7C385.4 363 386 364.5 385.7 366.2M240.1 416.6c0 5.1-9.7 9.3-21.7 9.3 -12 0-21.7-4.2-21.7-9.3 0-5.1 9.7-9.3 21.7-9.3C230.4 407.3 240.1 411.4 240.1 416.6M445.1 328.6c0 5.1-9.7 9.3-21.7 9.3 -12 0-21.7-4.2-21.7-9.3 0-5.1 9.7-9.3 21.7-9.3C435.4 319.3 445.1 323.4 445.1 328.6"/>
<g id="GrayLines">
<polygon id="GrayLine_39" class="st2" points="572 345.5 240.2 489.5 66 414.8 66 420.9 240.2 495.5 572 351.5 "/>
<polygon id="GrayLine_40" class="st2" points="572 356.6 240.2 500.6 66 426 66 432 240.2 506.6 572 362.6 "/>
<polygon id="GrayLine_41" class="st2" points="572 367.7 240.2 511.7 66 437.1 66 443.1 240.2 517.8 572 373.8 "/>
<polygon id="GrayLine_42" class="st2" points="572 378.9 240.2 522.9 66 448.2 66 454.3 240.2 528.9 572 384.9 "/>
<polygon id="GrayLine_43" class="st2" points="572 390 240.2 534 66 459.4 66 465.4 240.2 540 572 396 "/>
<polygon id="GrayLine_44" class="st2" points="572 401.1 240.2 545.1 66 470.5 66 476.5 240.2 551.2 572 407.2 "/>
<polygon id="GrayLine_45" class="st2" points="572 412.3 240.2 556.3 66 481.6 66 487.7 240.2 562.3 572 418.3 "/>
<polygon id="GrayLine_46" class="st2" points="572 423.4 240.2 567.4 66 492.8 66 498.8 240.2 573.4 572 429.4 "/>
<polygon id="GrayLine_47" class="st2 red" points="572 434.5 240.2 578.5 66 503.9 66 509.9 240.2 584.6 572 440.6 "/>
<polygon id="GrayLine_01" class="st2" points="573 456.8 241.2 600.8 67 526.2 67 532.2 241.2 606.8 573 462.8 "/>
<polygon id="GrayLine_02" class="st2 red" points="573 445.7 241.2 589.7 67 515 67 521.1 241.2 595.7 573 451.7 "/>
<polygon id="GrayLine_03" class="st2" points="573 467.9 241.2 611.9 67 537.3 67 543.3 241.2 618 573 474 "/>
<polygon id="GrayLine_04" class="st2 red" points="573 479.1 241.2 623.1 67 548.4 67 554.5 241.2 629.1 573 485.1 "/>
<polygon id="GrayLine_05" class="st2" points="573 490.2 241.2 634.2 67 559.6 67 565.6 241.2 640.2 573 496.2 "/>
<polygon id="GrayLine_06" class="st2" points="573 501.3 241.2 645.4 67 570.7 67 576.7 241.2 651.4 573 507.4 "/>
<polygon id="GrayLine_07" class="st2 red" points="573 512.5 241.2 656.5 67 581.8 67 587.9 241.2 662.5 573 518.5 "/>
<polygon id="GrayLine_08" class="st2" points="573 523.6 241.2 667.6 67 593 67 599 241.2 673.7 573 529.6 "/>
<polygon id="GrayLine_09" class="st2" points="573 534.7 241.2 678.8 67 604.1 67 610.1 241.2 684.8 573 540.8 "/>
<polygon id="GrayLine_10" class="st2 red" points="573 545.9 241.2 689.9 67 615.2 67 621.3 241.2 695.9 573 551.9 "/>
<polygon id="GrayLine_11" class="st2" points="573 557 241.2 701 67 626.4 67 632.4 241.2 707.1 573 563 "/>
<polygon id="GrayLine_12" class="st2" points="573 568.1 241.2 712.2 67 637.5 67 643.5 241.2 718.2 573 574.2 "/>
<polygon id="GrayLine_13" class="st2" points="573 579.3 241.2 723.3 67 648.6 67 654.7 241.2 729.3 573 585.3 "/>
<polygon id="GrayLine_14" class="st2" points="573 590.4 241.2 734.4 67 659.8 67 665.8 241.2 740.5 573 596.4 "/>
<polygon id="GrayLine_15" class="st2" points="573 601.6 241.2 745.6 67 670.9 67 676.9 241.2 751.6 573 607.6 "/>
<polygon id="GrayLine_16" class="st2" points="573 612.7 241.2 756.7 67 682.1 67 688.1 241.2 762.7 573 618.7 "/>
<polygon id="GrayLine_17" class="st2" points="573 623.8 241.2 767.8 67 693.2 67 699.2 241.2 773.9 573 629.9 "/>
<polygon id="GrayLine_18" class="st2" points="573 634.9 241.2 779 67 704.3 67 710.3 241.2 785 573 641 "/>
<polygon id="GrayLine_19" class="st2" points="573 646.1 241.2 790.1 67 715.5 67 721.5 241.2 796.1 573 652.1 "/>
<polygon id="GrayLine_20" class="st2" points="573 657.2 241.2 801.2 67 726.6 67 732.6 241.2 807.3 573 663.3 "/>
<polygon id="GrayLine_21" class="st2" points="573 668.4 241.2 812.4 67 737.7 67 743.8 241.2 818.4 573 674.4 "/>
<polygon id="GrayLine_22" class="st2" points="573 679.5 241.2 823.5 67 748.9 67 754.9 241.2 829.5 573 685.5 "/>
<polygon id="GrayLine_23" class="st2" points="573 690.6 241.2 834.6 67 760 67 766 241.2 840.7 573 696.7 "/>
<polygon id="GrayLine_24" class="st2" points="573 701.8 241.2 845.8 67 771.1 67 777.2 241.2 851.8 573 707.8 "/>
<polygon id="GrayLine_25" class="st2" points="573 712.9 241.2 856.9 67 782.3 67 788.3 241.2 862.9 573 718.9 "/>
<polygon id="GrayLine_26" class="st2" points="573 724 241.2 868 67 793.4 67 799.4 241.2 874.1 573 730.1 "/>
<polygon id="GrayLine_27" class="st2" points="573 735.2 241.2 879.2 67 804.5 67 810.6 241.2 885.2 573 741.2 "/>
<polygon id="GrayLine_28" class="st2" points="573 746.3 241.2 890.3 67 815.7 67 821.7 241.2 896.3 573 752.3 "/>
<polygon id="GrayLine_29" class="st2" points="573 757.4 241.2 901.4 67 826.8 67 832.8 241.2 907.5 573 763.5 "/>
<polygon id="GrayLine_30" class="st2" points="573 768.6 241.2 912.6 67 837.9 67 844 241.2 918.6 573 774.6 "/>
<polygon id="GrayLine_31" class="st2" points="573 779.7 241.2 923.7 67 849.1 67 855.1 241.2 929.7 573 785.7 "/>
<polygon id="GrayLine_32" class="st2" points="573 790.8 241.2 934.8 67 860.2 67 866.2 241.2 940.9 573 796.9 "/>
<polygon id="GrayLine_33" class="st2" points="573 802 241.2 946 67 871.3 67 877.4 241.2 952 573 808 "/>
<polygon id="GrayLine_34" class="st2" points="573 813.1 241.2 957.1 67 882.5 67 888.5 241.2 963.1 573 819.1 "/>
<polygon id="GrayLine_35" class="st2" points="573 824.2 241.2 968.2 67 893.6 67 899.6 241.2 974.3 573 830.3 "/>
<polygon id="GrayLine_36" class="st2" points="573 835.4 241.2 979.4 67 904.7 67 910.8 241.2 985.4 573 841.4 "/>
<polygon id="GrayLine_37" class="st2" points="573 846.5 241.2 990.5 67 915.9 67 921.9 241.2 996.6 573 852.5 "/>
<polygon id="GrayLine_38" class="st2" points="573 857.6 241.2 1001.6 67 927 67 933 241.2 1007.7 573 863.7 "/>
</g>
<g id="GreenLines">
<polygon id="GreenLine_01" class="st3" points="572 456 240.2 600 66 525.3 66 531.4 240.2 606 572 462 "/>
<polygon id="GreenLine_02" class="st3" points="572 444.8 240.2 588.8 66 514.2 66 520.2 240.2 594.8 572 450.8 "/>
<polygon id="GreenLine_03" class="st3" points="572 467.1 240.2 611.1 66 536.5 66 542.5 240.2 617.2 572 473.2 "/>
<polygon id="GreenLine_04" class="st3" points="572 478.3 240.2 622.3 66 547.6 66 553.7 240.2 628.3 572 484.3 "/>
<polygon id="GreenLine_05" class="st3" points="572 489.4 240.2 633.5 66 558.8 66 564.8 240.2 639.5 572 495.5 "/>
<polygon id="GreenLine_06" class="st3" points="572 500.6 240.2 644.6 66 570 66 576 240.2 650.6 572 506.6 "/>
<polygon id="GreenLine_07" class="st3" points="572 511.8 240.2 655.8 66 581.1 66 587.1 240.2 661.8 572 517.8 "/>
<polygon id="GreenLine_08" class="st3" points="572 522.9 240.2 666.9 66 592.3 66 598.3 240.2 673 572 528.9 "/>
<polygon id="GreenLine_09" class="st3" points="572 534.1 240.2 678.1 66 603.4 66 609.5 240.2 684.1 572 540.1 "/>
<polygon id="GreenLine_10" class="st3" points="572 545.2 240.2 689.2 66 614.6 66 620.6 240.2 695.3 572 551.3 "/>
<polygon id="GreenLine_11" class="st3" points="572 556.4 240.2 700.4 66 625.7 66 631.8 240.2 706.4 572 562.4 "/>
<polygon id="GreenLine_12" class="st3" points="572 567.5 240.2 711.6 66 636.9 66 642.9 240.2 717.6 572 573.6 "/>
<polygon id="GreenLine_13" class="st3" points="572 578.7 240.2 722.7 66 648.1 66 654.1 240.2 728.7 572 584.7 "/>
<polygon id="GreenLine_14" class="st3" points="572 589.9 240.2 733.9 66 659.2 66 665.2 240.2 739.9 572 595.9 "/>
<polygon id="GreenLine_15" class="st3" points="572 601 240.2 745 66 670.4 66 676.4 240.2 751.1 572 607 "/>
<polygon id="GreenLine_16" class="st3" points="572 612.2 240.2 756.2 66 681.5 66 687.6 240.2 762.2 572 618.2 "/>
<polygon id="GreenLine_17" class="st3" points="572 623.8 240.2 767.8 66 693.2 66 699.2 240.2 773.9 572 629.9 "/>
<polygon id="GreenLine_18" class="st3" points="572 634.9 240.2 779 66 704.3 66 710.3 240.2 785 572 641 "/>
<polygon id="GreenLine_19" class="st3" points="572 646.1 240.2 790.1 66 715.5 66 721.5 240.2 796.1 572 652.1 "/>
<polygon id="GreenLine_20" class="st3" points="572 657.2 240.2 801.2 66 726.6 66 732.6 240.2 807.3 572 663.3 "/>
<polygon id="GreenLine_21" class="st3" points="572 668.4 240.2 812.4 66 737.7 66 743.8 240.2 818.4 572 674.4 "/>
<polygon id="GreenLine_22" class="st3" points="572 679.5 240.2 823.5 66 748.9 66 754.9 240.2 829.5 572 685.5 "/>
<polygon id="GreenLine_23" class="st3" points="572 690.6 240.2 834.6 66 760 66 766 240.2 840.7 572 696.7 "/>
<polygon id="GreenLine_24" class="st3" points="572 701.8 240.2 845.8 66 771.1 66 777.2 240.2 851.8 572 707.8 "/>
<polygon id="GreenLine_25" class="st3" points="572 712.9 240.2 856.9 66 782.3 66 788.3 240.2 862.9 572 718.9 "/>
<polygon id="GreenLine_26" class="st3" points="572 723.7 240.2 867.8 66 793.1 66 799.1 240.2 873.8 572 729.8 "/>
<polygon id="GreenLine_27" class="st3" points="572 735.2 240.2 879.2 66 804.5 66 810.6 240.2 885.2 572 741.2 "/>
<polygon id="GreenLine_28" class="st3" points="572 746.3 240.2 890.3 66 815.7 66 821.7 240.2 896.3 572 752.3 "/>
<polygon id="GreenLine_29" class="st3" points="572 757.4 240.2 901.4 66 826.8 66 832.8 240.2 907.5 572 763.5 "/>
<polygon id="GreenLine_30" class="st3" points="572 768.6 240.2 912.6 66 837.9 66 844 240.2 918.6 572 774.6 "/>
<polygon id="GreenLine_31" class="st3" points="572 779.7 240.2 923.7 66 849.1 66 855.1 240.2 929.7 572 785.7 "/>
<polygon id="GreenLine_32" class="st3" points="572 790.8 240.2 934.8 66 860.2 66 866.2 240.2 940.9 572 796.9 "/>
<polygon id="GreenLine_33" class="st3" points="572 802 240.2 946 66 871.3 66 877.4 240.2 952 572 808 "/>
<polygon id="GreenLine_34" class="st3" points="572 813.1 240.2 957.1 66 882.5 66 888.5 240.2 963.1 572 819.1 "/>
<polygon id="GreenLine_35" class="st3" points="572 824.2 240.2 968.2 66 893.6 66 899.6 240.2 974.3 572 830.3 "/>
<polygon id="GreenLine_36" class="st3" points="572 835.4 240.2 979.4 66 904.7 66 910.8 240.2 985.4 572 841.4 "/>
<polygon id="GreenLine_37" class="st3" points="572 846.5 240.2 990.5 66 915.9 66 921.9 240.2 996.6 572 852.5 "/>
<polygon id="GreenLine_38" class="st3" points="572 857.6 240.2 1001.6 66 927 66 933 240.2 1007.7 572 863.7 "/>
</g>
</svg>
body {
background-color: #ffffff;
}
/* ..................................... */
svg {
display: block;
overflow: visible;
width: 400px;
position: absolute;
left: 35%;
top: -350px;
}
/* ..................................... */
#GreenLines{
visibility:hidden;
}
#dollarTOP{
visibility:hidden;
}
#dollarBOTTOM{
opacity: .25;
z-index: -1;
}
tl = new TimelineMax( {} );
var graylines = $('#GrayLines polygon');
graylines = graylines.get().reverse();
var redLines = $('#GrayLines .red');
redLines = redLines.get().reverse(); //reverse the sequence / starting from bottom
tl.set( graylines , {opacity: 0} );
tl.to("#dollarTOP, #dollarBOTTOM", .5, { delay: .5, y: -523, ease:Power1.easeInOut } );
tl.staggerTo( graylines, .5, { delay: .5, opacity: .25, ease:Power4.Linear }, .009, 0 );
tl.staggerTo( redLines, .2, { delay: 2, fill: "#fa042b", opacity: 1, ease:Power1.easeInOut }, .8, 0 );
Also see: Tab Triggers