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.
<div class="svg-wrapper">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 437.348 152.418" class="svg">
<defs>
<clipPath id="clipPathScreen">
<rect x="117.388" y="80.995" fill="none" width="90.319" height="58.7"/>
</clipPath>
</defs>
<path fill="#f1eff2" class="blobs" d="M320.543 67.626c0 2.82 2.285 5.104 5.105 5.104h21.182c2.256 0 4.084 1.828 4.084 4.084 0 2.254-1.828 4.082-4.084 4.082h-7.656c-2.818 0-5.104 2.285-5.104 5.104v.255c0 2.82 2.285 5.104 5.104 5.104h64.21c2.82 0 5.105-2.285 5.105-5.105V86c0-2.82-2.286-5.104-5.105-5.104H379.69c-2.256 0-4.084-1.828-4.084-4.082 0-2.256 1.828-4.084 4.084-4.084h7.607c2.818 0 5.104-2.285 5.104-5.104 0-2.818-2.284-5.104-5.103-5.104H325.65c-2.82 0-5.107 2.286-5.107 5.104zM182.232 32.255c0 2.818 2.285 5.104 5.104 5.104h21.183c2.254 0 4.082 1.827 4.082 4.082 0 2.256-1.828 4.084-4.083 4.084h-7.657c-2.82 0-5.104 2.285-5.104 5.104v.256c0 2.818 2.284 5.104 5.103 5.104h64.21c2.818 0 5.103-2.285 5.103-5.104v-.256c0-2.818-2.285-5.104-5.104-5.104h-23.694c-2.254 0-4.082-1.828-4.082-4.084 0-2.255 1.828-4.083 4.082-4.083h7.607c2.818 0 5.104-2.287 5.104-5.105 0-2.82-2.286-5.104-5.105-5.104h-61.65c-2.818 0-5.103 2.286-5.103 5.105zM16.25 105.604c0 2.818 2.285 5.104 5.104 5.104h21.183c2.255 0 4.083 1.83 4.083 4.084 0 2.255-1.828 4.083-4.083 4.083H34.88c-2.82 0-5.104 2.285-5.104 5.104v.255c0 2.818 2.285 5.104 5.104 5.104h64.21c2.82 0 5.104-2.285 5.104-5.105v-.256c0-2.82-2.285-5.105-5.104-5.105H75.396c-2.255 0-4.083-1.828-4.083-4.083s1.828-4.084 4.083-4.084h7.607c2.82 0 5.104-2.285 5.104-5.104 0-2.818-2.285-5.104-5.104-5.104h-61.65c-2.818 0-5.103 2.284-5.103 5.104zM75.126 72.544c0 2.818 2.286 5.104 5.104 5.104h21.183c2.255 0 4.083 1.828 4.083 4.084 0 2.254-1.828 4.082-4.083 4.082h-7.657c-2.82 0-5.104 2.287-5.104 5.104v.256c0 2.818 2.286 5.104 5.104 5.104h64.21c2.82 0 5.104-2.285 5.104-5.104v-.256c0-2.817-2.286-5.104-5.104-5.104h-23.694c-2.255 0-4.083-1.828-4.083-4.082 0-2.256 1.827-4.084 4.082-4.084h7.607c2.818 0 5.103-2.286 5.103-5.104 0-2.82-2.286-5.104-5.104-5.104H80.23c-2.818 0-5.104 2.285-5.104 5.104z"/>
<path fill="#f1eff2" class="blobs" d="M413.8 113.204h-22.2c-2.818 0-5.104-2.285-5.104-5.104 0-2.817 2.285-5.104 5.104-5.104h22.2c2.82 0 5.104 2.286 5.104 5.104 0 2.82-2.284 5.104-5.105 5.104zM55.644 77.335h-29.61c-2.818 0-5.103-2.285-5.103-5.104 0-2.818 2.287-5.103 5.105-5.103h29.61c2.818 0 5.103 2.285 5.103 5.104 0 2.82-2.285 5.105-5.104 5.105z"/>
<circle class="bg-dot" fill="#BCBEC0" cx="97.236" cy="54.018" r="1.76"/>
<circle class="bg-dot" fill="#BCBEC0" cx="286.924" cy="14.777" r="1.003"/>
<circle class="bg-dot" fill="#BCBEC0" cx="140.225" cy="3.842" r="1.003"/>
<circle class="bg-dot" fill="#BCBEC0" cx="397.489" cy="59.735" r="1.321"/>
<circle class="bg-dot" fill="#BCBEC0" cx="321.934" cy="5.667" r="1.825"/>
<circle class="bg-dot" fill="#BCBEC0" cx="38.99" cy="85.802" r="1.605"/>
<circle class="bg-dot" fill="#BCBEC0" cx="353.913" cy="24.699" r="1.945"/>
<circle class="bg-dot" fill="#BCBEC0" cx="20.752" cy="126.085" r="1.397"/>
<circle class="bg-dot" fill="#BCBEC0" cx="210.949" cy="1.921" r="1.921"/>
<g>
<path class="bg-star" fill="#BCBEC0" d="M66.97,88.154c-1.735,0.461-2.108,0.834-2.568,2.568c-0.46-1.734-0.833-2.107-2.568-2.568
c1.735-0.459,2.108-0.834,2.568-2.567C64.862,87.32,65.235,87.695,66.97,88.154z"/>
<path class="bg-star" fill="#BCBEC0" d="M69.707,45.868c-1.308,0.347-1.589,0.628-1.937,1.937c-0.347-1.309-0.628-1.59-1.937-1.937
c1.309-0.348,1.59-0.629,1.937-1.938C68.118,45.239,68.399,45.521,69.707,45.868z"/>
<path class="bg-star" fill="#BCBEC0" d="M179.603,18.048c-1.734,0.46-2.107,0.833-2.567,2.566c-0.46-1.733-0.833-2.106-2.567-2.566
c1.734-0.46,2.107-0.833,2.567-2.567C177.496,17.215,177.869,17.588,179.603,18.048z"/>
<path class="bg-star" fill="#BCBEC0" d="M410.147,124.997c-1.621,0.431-1.973,0.778-2.4,2.401c-0.432-1.623-0.779-1.972-2.402-2.401
c1.623-0.431,1.973-0.779,2.402-2.401C408.176,124.218,408.526,124.566,410.147,124.997z"/>
<path class="bg-star" fill="#BCBEC0" d="M244.456,5.667c-1.623,0.431-1.973,0.779-2.401,2.401c-0.431-1.622-0.779-1.971-2.402-2.401
c1.623-0.431,1.972-0.779,2.402-2.402C242.483,4.888,242.833,5.236,244.456,5.667z"/>
<path class="bg-star" fill="#BCBEC0" d="M371.647,46.583c-2.127,0.564-2.584,1.021-3.148,3.147c-0.564-2.126-1.021-2.583-3.146-3.147
c2.125-0.563,2.582-1.021,3.146-3.146C369.063,45.562,369.522,46.02,371.647,46.583z"/>
<path class="bg-star" fill="#BCBEC0" d="M282.106,31.819c-2.676,0.71-3.251,1.285-3.961,3.96c-0.71-2.675-1.285-3.25-3.96-3.96
c2.675-0.71,3.25-1.285,3.96-3.96C278.855,30.534,279.431,31.109,282.106,31.819z"/>
<path class="bg-star" fill="#BCBEC0" d="M96.463,18.048c-2.209,0.586-2.685,1.061-3.271,3.271c-0.586-2.21-1.062-2.685-3.271-3.271
c2.209-0.586,2.684-1.062,3.271-3.271C93.778,16.986,94.253,17.462,96.463,18.048z"/>
</g>
<path fill="#FFB900" d="M369.692 74.76v76.106c0 .438-.355.792-.793.792h-8.696c-.438 0-.79-.354-.79-.792V74.76c0-.438.353-.792.79-.792h8.695c.436 0 .792.354.792.79z"/>
<path fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" d="M369.692 74.76v76.106c0 .438-.355.792-.793.792h-8.696c-.438 0-.79-.354-.79-.792V74.76c0-.438.353-.792.79-.792h8.695c.436 0 .792.354.792.79zM359.413 143.396h5.935M359.413 134.77h5.935M359.413 126.146h5.935M359.413 117.52h5.935M359.413 108.895h5.935M359.413 100.268h5.935M359.413 91.643h5.935M359.413 83.016h5.935"/>
<g>
<g class="stopwatch-button">
<path fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" d="M57.534 120.824v8.256"/>
<path fill="#00CBB8" d="M61.81 122.812h-8.66c-.443 0-.803-.36-.803-.803v-3.465c0-.443.36-.804.803-.804h8.66c.443 0 .802.36.802.805v3.464c0 .443-.36.802-.803.802z"/>
<path fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" d="M61.81 122.812h-8.66c-.443 0-.803-.36-.803-.803v-3.465c0-.443.36-.804.803-.804h8.66c.443 0 .802.36.802.805v3.464c0 .443-.36.802-.803.802z"/>
</g>
<path fill="#00CBB8" d="M82.877 150.87c0-13.997-11.347-25.343-25.344-25.343S32.19 136.873 32.19 150.87h50.687z"/>
<path fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" d="M64.744 126.568c-2.285-.678-4.705-1.04-7.21-1.04-13.997 0-25.344 11.347-25.344 25.343"/>
<path fill="#E6E7E8" d="M78.992 150.87c0-11.852-9.607-21.458-21.458-21.458s-21.458 9.606-21.458 21.46h42.916z"/>
<path fill="#FFF" d="M69.213 150.87c0-6.45-5.23-11.68-11.68-11.68-6.45 0-11.68 5.228-11.68 11.68h23.36z"/>
<path fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" d="M64.376 130.527c-2.15-.723-4.45-1.113-6.843-1.113-11.85 0-21.458 9.605-21.458 21.457M57.534 129.08l-.052 4.108M38.965 140.115l3.7 2.205M47.702 132.04l1.93 3.452M41.695 125.763l1.806 3.128"/>
<path fill="#00CBB8" d="M39.776 128.634l5.437-3.14c.384-.223.516-.713.293-1.1l-1.144-1.978c-.222-.385-.713-.516-1.097-.295l-5.437 3.143c-.384.222-.516.713-.293 1.097l1.144 1.98c.22.385.713.516 1.096.294z"/>
<path fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" d="M39.776 128.634l5.437-3.14c.384-.223.516-.713.293-1.1l-1.144-1.978c-.222-.385-.713-.516-1.097-.295l-5.437 3.143c-.384.222-.516.713-.293 1.097l1.144 1.98c.22.385.713.516 1.096.294z"/>
<g class="stopwatch-dial">
<circle fill="none" cx="57.534" cy="150.87" r="21.458"/>
<circle fill="#414042" cx="57.534" cy="150.87" r="2.663"/>
<path fill="#414042" d="M56.783 149.87l.395-13.22.582-.002.524 13.216"/>
</g>
</g>
<g class="diamond">
<path class="diamond-face-1" fill="#AFF9EE" d="M405.874 143.113l-5.762-6.37-5.762-6.368-5.764-6.37-8.396 1.807-2.963 25.844 26.012-.368"/>
<path class="diamond-face-2" fill="#6DF2E2" d="M385.954 132.182l2.632-8.176-8.187 2.115M391.797 138.298l2.553-7.923-8.123 1.747M397.522 144.97l2.336-8.13-7.912 2.044"/>
<path class="diamond-face-3" fill="#6DF2E2" d="M391.715 138.55l-13.523 12.233 19.152-6.012"/>
<path class="diamond-face-4" fill="#00CBB8" d="M380.438 126.085l-.135.122-2.68 24.563 8.075-18.872M402.782 150.783l-.135.12-24.707.215 19.582-6.15"/>
<path fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" d="M401.305 138.062l-6.955-7.687-5.764-6.37-8.396 1.807-2.963 25.844 26.012-.368 2.634-8.175-1.666-1.842M403.64 140.643l-1.88-2.077M380.19 125.812l23.05 25.476M377.227 151.656l8.727-19.474M377.557 151.357l20.25-6.738M391.715 138.55l-14.158 12.807M388.586 124.006l-2.632 8.176M394.35 130.375l-2.635 8.176M400.112 136.744l-2.635 8.176M405.874 143.113l-8.397 1.805M400.112 136.744l-8.397 1.806M394.35 130.376l-8.398 1.806"/>
</g>
<g>
<path fill="#FFF" d="M353.102 151.29v-70.5c0-2.126-1.53-3.85-3.418-3.85h-50.518c-1.888 0-3.418 1.724-3.418 3.85v70.5h57.354z"/>
<path fill="#D1D3D4" d="M295.75 85.802v-5.985c0-1.588 1.286-2.875 2.874-2.875h51.604c1.588 0 2.875 1.287 2.875 2.875v5.985H295.75z"/>
<path fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" d="M299.96 76.94h50.27c1.587 0 2.872 1.288 2.872 2.876v71.842M299.57 85.957h53.532M302.334 81.86h1.34M306.215 81.86h1.34M310.094 81.86h1.34"/>
<path class="responsive-screen-3" fill="#FFB900" d="M303.432 92.573h41.986v16.562h-41.986z"/>
<path fill="#00CBB8" d="M303.437 119.65h12.767v16.562h-12.767z"/>
<path fill="#E6E7E8" d="M318.047 119.65h12.766v16.562h-12.766z"/>
<path fill="#00CBB8" d="M332.657 119.65h12.766v16.562h-12.766z"/>
<path fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" d="M315.504 114.375h17.852"/>
<g class="cog">
<path fill="#FFB900" stroke="#414042" stroke-width="2" stroke-miterlimit="10" d="M344.16,146.835l-3.584-0.014
c-0.426-1.863-1.158-3.605-2.146-5.17l2.537-2.537c0.908-0.904,0.914-2.375,0.006-3.279l-1.896-1.898
c-0.904-0.902-2.373-0.91-3.277-0.008l-2.543,2.539c-1.561-0.988-3.303-1.721-5.16-2.145v-3.586c0-1.279-1.041-2.318-2.326-2.318
h-2.68c-1.283,0-2.32,1.039-2.32,2.318v3.586c-1.832,0.412-3.543,1.137-5.09,2.094l-2.521-2.545
c-0.904-0.908-2.373-0.926-3.281-0.016l-1.908,1.887c-0.906,0.895-0.916,2.369-0.016,3.277l2.52,2.553
c-0.994,1.555-1.734,3.297-2.164,5.156l-3.583-0.016c-1.283-0.012-2.323,1.029-2.323,2.314l-0.018,1.4v0.012v0.012l0.018,1.4
c0,1.285,1.04,2.328,2.323,2.314l1.05-0.004l-0.05,0.004l2.583-0.016c0.43,1.859,1.17,3.602,2.164,5.156l-2.52,2.553
c-0.9,0.91-0.891,2.383,0.016,3.277l1.908,1.887c0.908,0.91,2.377,0.893,3.281-0.016l2.521-2.545
c1.547,0.957,3.258,1.682,5.09,2.094v3.588c0,1.277,1.037,2.316,2.32,2.316h2.68c1.285,0,2.326-1.039,2.326-2.316v-3.588
c1.857-0.424,3.6-1.154,5.16-2.145l2.543,2.539c0.904,0.902,2.373,0.895,3.277-0.008l1.896-1.9c0.908-0.902,0.902-2.373-0.006-3.277
l-2.537-2.537c0.988-1.564,1.721-3.307,2.146-5.168l3.584-0.018c1.277,0,2.307-1.037,2.307-2.307v-1.283v-0.002v-0.023v-0.002
v-1.281C346.466,147.872,345.437,146.835,344.16,146.835z M324.426,157.8c-4.064,0-7.359-3.295-7.359-7.359s3.295-7.359,7.359-7.359
c4.063,0,7.358,3.295,7.358,7.359S328.49,157.8,324.426,157.8z"/>
</g>
</g>
<g>
<path fill="#6D6E71" d="M297.243 119.89H178.925V55.355c0-3.226 2.615-5.84 5.84-5.84h106.64c3.225 0 5.84 2.614 5.84 5.84v64.537h-.002z"/>
<path fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" d="M199.634 49.514h91.55c3.348 0 6.06 2.712 6.06 6.06v33.91M194.727 49.514h2.355M178.925 72.23V55.572c0-3.347 2.713-6.06 6.06-6.06h7.513"/>
<path fill="#FFF" d="M185.345 56.395h105.61v55.585h-105.61zM220.26 130.557h35.648v21.103H220.26z"/>
<path fill="#D1D3D4" d="M220.26 130.557h35.648v10.55H220.26z"/>
<path fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" d="M220.26 151.584v-19.148h35.65v19.148"/>
<path fill="#FFF" d="M297.243 117.307H178.925v13.98c0 1.103.896 2 2 2h114.318c1.104 0 2-.897 2-2v-13.98z"/>
<path fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" d="M215.393 133.284h50.473M265.866 117.307h-50.473"/>
<path class="responsive-screen-1" fill="#FFB900" d="M192.81 60.326h91.015V80.1H192.81z"/>
<path fill="#00CBB8" d="M192.81 83.145h24.225v25.492H192.81z"/>
<path fill="#E6E7E8" d="M226.204 83.08h24.226v25.493h-24.226z"/>
<path fill="#00CBB8" d="M259.6 83.018h24.225v25.492H259.6z"/>
<path fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" d="M213.33 151.59h50.067"/>
</g>
<path opacity=".3" fill="#231F20" d="M298.06 91.18h-28.272c-2.217 0-4.02 1.803-4.02 4.02v38.836h1.1v-.75h29.377c1.104 0 2-.896 2-2V91.198c-.064-.002-.123-.017-.186-.017z"/>
<path opacity=".3" fill="#231F20" d="M304.635 151.448c.875-.738 1.443-1.828 1.443-3.06v-53.19c0-2.216-1.804-4.02-4.02-4.02h-7.31v60.11h6.636l-.002.158 3.253.002z"/>
<g>
<path fill="#FFF" d="M300.06 151.658h-28.272c-1.806 0-3.27-1.465-3.27-3.27v-53.19c0-1.806 1.464-3.27 3.27-3.27h28.27c1.808 0 3.27 1.464 3.27 3.27v53.19c0 1.805-1.464 3.27-3.27 3.27z"/>
<path fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" d="M300.06 151.658h-28.272c-1.806 0-3.27-1.465-3.27-3.27v-53.19c0-1.806 1.464-3.27 3.27-3.27h28.27c1.808 0 3.27 1.464 3.27 3.27v53.19c0 1.805-1.464 3.27-3.27 3.27z"/>
<path fill="#FFF" d="M271.63 100.675h28.585v40.705H271.63z"/>
<path fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" d="M281.338 97.602h9.17"/>
<circle fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" cx="285.922" cy="146.115" r="2.505"/>
<path class="responsive-screen-2" fill="#FFB900" d="M274.004 104.243h23.838v10.978h-23.838z"/>
<path fill="#00CBB8" d="M274.004 117.874h10.468v21.09h-10.468z"/>
<path fill="#E6E7E8" d="M287.635 117.874h10.47v21.09h-10.47z"/>
</g>
<g opacity=".3" fill="#231F20">
<path d="M64.767 126.604l.214-.726c-.46-.137-.927-.253-1.395-.362V150.9h19.317c0-11.492-7.65-21.192-18.135-24.296z"/>
<path d="M69.117 126.173l2.105 1.216-.668 1.155 1.3.75.667-1.156 2.033 1.173c.24.14.506.21.775.21.135 0 .27-.02.403-.054.402-.108.737-.364.945-.725l1.144-1.98c.207-.358.263-.778.155-1.18-.107-.4-.364-.735-.724-.942l-5.436-3.14c-.74-.43-1.692-.176-2.122.567l-1.145 1.98c-.427.744-.172 1.695.57 2.123z"/>
</g>
<g>
<path fill="#FFF" d="M112.636 151.657V99.79c0-1.963-1.208-3.556-2.7-3.556h-39.9c-1.49 0-2.7 1.593-2.7 3.557v51.868h45.3z"/>
<path fill="#808285" d="M67.336 103.232v-4.73c0-1.253 1.016-2.27 2.27-2.27h40.76c1.254 0 2.27 1.017 2.27 2.27v4.73h-45.3z"/>
<path fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" d="M67.336 151.51V98.505c0-1.254 1.016-2.27 2.27-2.27h2.18-1.293M75.798 96.234h31.436M72.69 96.234h2.256M67.336 103.355h39.898M72.538 100.12h1.813M76.734 100.12h1.813M80.93 100.12h1.813"/>
<path fill="#FFB900" d="M73.404 107.555h33.164v44.104H73.404z"/>
<g>
<g class="magic-wand">
<path fill="#6D6E71" d="M72.843 140.21l-2.043-2.043c-.245-.244-.245-.642 0-.886l18.153-18.152c.245-.245.642-.245.887 0l2.043 2.042c.245.245.245.643 0 .887L73.73 140.21c-.245.245-.642.245-.887 0z"/>
<path fill="#939598" d="M71.378 138.745l-.578-.578c-.245-.244-.245-.642 0-.887l18.153-18.152c.245-.245.642-.245.887 0l.578.578c.245.244.245.642 0 .888l-18.153 18.15c-.245.246-.642.246-.887 0z"/>
<path fill="#FFF" d="M91.862 121.148l-2-2c-.257-.256-.673-.256-.93 0l-4.832 4.834 2.93 2.93 4.832-4.834c.257-.257.257-.673 0-.93z"/>
<path fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" d="M72.843 140.21l-2.043-2.043c-.245-.244-.245-.642 0-.886l18.153-18.152c.245-.245.642-.245.887 0l2.043 2.042c.245.245.245.643 0 .887L73.73 140.21c-.245.245-.642.245-.887 0z"/>
</g>
<g class="magic-rays">
<path fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" d="M90.49 110.762v4.663M95.58 112.126l-2.33 4.038M99.31 115.852l-4.038 2.334M100.675 120.943l-4.663.002M99.313 126.035l-4.04-2.33M95.588 129.766l-2.334-4.04M90.498 131.132l-.003-4.66M80.305 120.96l4.662-.006M81.662 115.866l4.042 2.325M85.384 112.134l2.337 4.035"/>
<circle fill="none" cx="90.49" cy="120.945" r="10.185"/>
</g>
</g>
</g>
<g fill="#231F20">
<path opacity=".3" d="M180.925 133.284h34.468v.75h1.498v-56.23c0-1.793-1.457-3.25-3.25-3.25h-9.77v.75h-2.93v-.75h-6.95v.75h-4.455v-.75h-10.61V131.287c0 1.103.895 1.998 2 1.998z"/>
<path opacity=".2" d="M218.51 150.84h-5.18v1.5h1.82c1.276-.156 2.438-.684 3.36-1.5z"/>
</g>
<path opacity=".3" fill="#231F20" d="M112.636 103.232v-4.727c0-1.254-1.016-2.27-2.27-2.27h-.616v46.368h-4.935l.843 5.14c.278 1.7 1.296 3.104 2.694 3.915h4.284V103.23z"/>
<g>
<path fill="#6D6E71" d="M212.14 147.643H113.5c-.55 0-1-.45-1-1v-70.34c0-.55.45-1 1-1h98.64c.55 0 1 .45 1 1v70.34c0 .548-.45 1-1 1z"/>
<path fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" d="M190.99 75.303h6.95M200.87 75.303h9.77c1.376 0 2.5 1.126 2.5 2.5v67.337c0 1.375-1.124 2.502-2.5 2.502h-95.638c-1.375 0-2.5-1.127-2.5-2.502V77.805c0-1.375 1.124-2.5 2.5-2.5h71.534"/>
<path fill="#FFF" d="M211.382 151.658H113.15c-2.358 0-4.37-1.71-4.75-4.036l-.7-4.27h45.528l1.742 2.503h12.58l1.883-2.502h47.963l-.61 3.713c-.432 2.648-2.72 4.592-5.404 4.592z"/>
<path fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" d="M211.382 151.658H113.15c-2.358 0-4.37-1.71-4.75-4.036l-.7-4.27h45.528l1.742 2.503h12.58l1.883-2.502h47.963l-.61 3.713c-.432 2.648-2.72 4.592-5.404 4.592z"/>
<g clip-path="url(#clipPathScreen)">
<path fill="#58595B" d="M117.388 80.995h90.32v58.7h-90.32z" />
<g class="code-lines">
<rect x="130.563" y="87.521" fill="#00CBB8" width="9.661" height="1.266"/>
<rect x="143.031" y="87.521" fill="#FFFFFF" width="39.172" height="1.266"/>
<rect x="135.395" y="91.844" fill="#FFFFFF" width="6.654" height="1.266"/>
<rect x="146.628" y="91.844" fill="#FFB936" width="7.486" height="1.266"/>
<rect x="156.766" y="91.844" fill="#FFFFFF" width="46.41" height="1.266"/>
<rect x="137.66" y="95.449" fill="#00CBB8" width="13.26" height="1.266"/>
<rect x="143.031" y="100.543" fill="#FFFFFF" width="16.827" height="1.266"/>
<rect x="161.343" y="100.543" fill="#FFFFFF" width="34.464" height="1.266"/>
<rect x="197.654" y="100.543" fill="#FFB936" width="4.158" height="1.266"/>
<rect x="130.563" y="105.335" fill="#FFB936" width="18.388" height="1.265"/>
<rect x="150.919" y="105.335" fill="#FFFFFF" width="13.284" height="1.265"/>
<rect x="135.395" y="110.127" fill="#FFFFFF" width="24.657" height="1.266"/>
<rect x="161.093" y="110.127" fill="#00CBB8" width="7.739" height="1.266"/>
<rect x="170.121" y="110.127" fill="#FFFFFF" width="16.394" height="1.266"/>
<rect x="137.66" y="114.919" fill="#FFB936" width="4.518" height="1.265"/>
<rect x="143.59" y="114.919" fill="#FFFFFF" width="21.575" height="1.265"/>
<rect x="130.563" y="118.438" fill="#FFFFFF" width="14.717" height="1.266"/>
<rect x="146.423" y="118.438" fill="#00CBB8" width="5.058" height="1.266"/>
<rect x="152.891" y="118.438" fill="#FFFFFF" width="24.145" height="1.266"/>
<rect x="178.91" y="118.438" fill="#FFFFFF" width="21.803" height="1.266"/>
<rect x="135.395" y="123.229" fill="#FFFFFF" width="7.637" height="1.267"/>
<rect x="145.282" y="123.229" fill="#FFB936" width="18.128" height="1.267"/>
<rect x="139.503" y="128.021" fill="#00CBB8" width="14.717" height="1.266"/>
<rect x="157.313" y="128.021" fill="#FFFFFF" width="14.717" height="1.266"/>
<rect x="174.316" y="128.021" fill="#FFFFFF" width="13.861" height="1.266"/>
</g>
<rect x="124.013" y="85.639" fill="#FFFFFF" width="2.036" height="2.035"/>
<rect x="124.013" y="91" fill="#FFFFFF" width="2.036" height="2.035"/>
<rect x="124.013" y="96.36" fill="#FFFFFF" width="2.036" height="2.035"/>
<rect x="124.013" y="101.722" fill="#FFFFFF" width="2.036" height="2.035"/>
<rect x="124.013" y="107.083" fill="#FFFFFF" width="2.036" height="2.035"/>
<rect x="124.013" y="112.443" fill="#FFFFFF" width="2.036" height="2.035"/>
<rect x="124.013" y="117.805" fill="#FFFFFF" width="2.036" height="2.035"/>
<rect x="124.013" y="123.166" fill="#FFFFFF" width="2.036" height="2.035"/>
<rect x="124.013" y="128.526" fill="#FFFFFF" width="2.036" height="2.035"/>
<rect x="124.013" y="133.888" fill="#FFFFFF" width="2.036" height="2.035"/>
</g>
</g>
<g class="cloud">
<g class="cloud-shape">
<path fill="#D1D3D4" d="M167.764 36.788h-.247c-1.086-3.742-4.534-6.48-8.626-6.48-1.786 0-3.446.527-4.845 1.427-.91-5.896-5.99-10.416-12.14-10.416-5.52 0-10.192 3.637-11.748 8.645-.7-.188-1.434-.298-2.194-.298-4.213 0-7.696 3.088-8.334 7.12h-1.377c-3.47 0-6.307 2.84-6.307 6.31v.463c0 3.47 2.838 6.308 6.307 6.308h49.51c3.47 0 6.308-2.838 6.308-6.308v-.464c0-3.47-2.837-6.308-6.306-6.308z"/>
<path fill="#FFF" d="M161.963 38.338h-.218c-.958-3.3-3.997-5.713-7.604-5.713-1.574 0-3.038.465-4.27 1.257-.802-5.198-5.28-9.183-10.703-9.183-4.867 0-8.985 3.206-10.356 7.622-.617-.166-1.263-.263-1.933-.263-3.714 0-6.785 2.72-7.347 6.277h-1.213c-3.058 0-5.56 2.502-5.56 5.56v.41c0 3.058 2.502 5.56 5.56 5.56h43.647c3.058 0 5.56-2.502 5.56-5.56v-.41c0-3.057-2.503-5.56-5.56-5.56z"/>
<path fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" d="M149.915 30.737c-1.825-2.812-4.988-4.672-8.59-4.672-1.907 0-3.692.52-5.222 1.428"/>
<path fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" d="M160.214 49.867h7.55c3.47 0 6.307-2.838 6.307-6.308v-.465c0-3.47-2.837-6.308-6.306-6.308h-.247c-1.086-3.742-4.534-6.48-8.626-6.48-1.786 0-3.446.527-4.845 1.427-.91-5.896-5.99-10.416-12.14-10.416-3.774 0-7.152 1.7-9.408 4.377-.5.595-.946 1.236-1.33 1.92-.414.738-.754 1.525-1.01 2.35-.7-.188-1.434-.298-2.194-.298-4.213 0-7.696 3.088-8.334 7.12h-1.377c-3.47 0-6.307 2.84-6.307 6.31v.463c0 3.47 2.838 6.308 6.307 6.308h7.207M128.12 29.63c2.418 0 4.378 1.96 4.378 "/>
</g>
<g class="cloud-arrows">
<g>
<circle fill="none" cx="143.028" cy="54.468" r="16.804"/>
<path fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" d="M158.333,61.416
c-2.643,5.813-8.502,9.855-15.305,9.855c-6.805,0-12.665-4.044-15.307-9.86"/>
<path fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" d="M127.721,47.519
c2.643-5.813,8.502-9.855,15.305-9.855c6.805,0,12.665,4.044,15.307,9.86"/>
<g>
<polygon fill="#414042" points="155.635,46.572 158.338,47.558 159.322,44.854 160.051,46.417 159.068,49.122 156.365,48.137
"/>
</g>
<g>
<polygon fill="#414042" points="130.43,62.488 127.757,61.423 126.694,64.097 126.011,62.512 127.073,59.838 129.747,60.902
"/>
</g>
</g>
<g>
<circle fill="#00CBB8" cx="143.031" cy="54.468" r="7.884"/>
<circle fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" cx="143.031" cy="54.468" r="7.884"/>
</g>
</g>
</g>
<g>
<path fill="#FFF" d="M311.303 41.57v18.837h2.422v9.227c0 .33.412.48.623.227l7.916-9.452h23.71V41.57h-34.67z"/>
<path fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" d="M311.303 54.85v5.558h2.422v9.227c0 .33.412.48.623.227l7.916-9.453h23.71V41.57h-8.907M335.225 45.868h6.512M332.395 50.873h9.342M326.875 55.878h14.862"/>
<path fill="#FFB900" d="M305.186 54.018l8.078-1.492c1.91.854 4.02 1.338 6.244 1.338 8.463 0 15.322-6.86 15.322-15.32 0-8.464-6.86-15.324-15.322-15.324-8.46 0-15.32 6.86-15.32 15.323 0 2.987.867 5.767 2.348 8.124l-1.35 7.35z"/>
<path fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" d="M305.186 54.018l8.078-1.492c1.91.854 4.02 1.338 6.244 1.338 8.463 0 15.322-6.86 15.322-15.32 0-8.464-6.86-15.324-15.322-15.324-8.46 0-15.32 6.86-15.32 15.323 0 2.987.867 5.767 2.348 8.124l-1.35 7.35z"/>
<ellipse fill="#FFF" cx="319.508" cy="38.619" rx="11.557" ry="11.829"/>
<circle fill="#FFF" cx="326.875" cy="39.011" r="1.906"/>
<circle fill="#FFF" cx="319.213" cy="39.011" r="1.906"/>
<circle fill="#FFF" cx="311.549" cy="39.011" r="1.906"/>
<circle class="speech-dot-3" fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" cx="326.875" cy="39.011" r="1.906"/>
<circle class="speech-dot-2" fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" cx="319.213" cy="39.011" r="1.906"/>
<circle class="speech-dot-1" fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" cx="311.549" cy="39.011" r="1.906"/>
</g>
<path fill="none" stroke="#414042" stroke-width="1.5" stroke-miterlimit="10" d="M0 151.658h437.348"/>
</svg>
</div>
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
body {
padding: 20px;
}
.svg-wrapper {
display: inline-block;
position: relative;
width: 100%;
padding-bottom: 100%;
vertical-align: middle;
overflow: hidden;
}
.svg {
display: inline-block;
position: absolute;
top: 0;
left: 0;
visibility: hidden;
}
var svg = document.querySelector(".svg"),
blobs = document.querySelectorAll(".blobs"),
bgDot = document.querySelectorAll(".bg-dot"),
bgStar = document.querySelectorAll(".bg-star"),
cloudShape = document.querySelector(".cloud-shape"),
cloudArrows = document.querySelector(".cloud-arrows"),
cog = document.querySelector(".cog"),
diamondFace1 = document.querySelectorAll(".diamond-face-1"),
diamondFace2 = document.querySelectorAll(".diamond-face-2"),
diamondFace3 = document.querySelectorAll(".diamond-face-3"),
diamondFace4 = document.querySelectorAll(".diamond-face-4"),
responsiveScreen1 = document.querySelector(".responsive-screen-1"),
responsiveScreen2 = document.querySelector(".responsive-screen-2"),
responsiveScreen3 = document.querySelector(".responsive-screen-3"),
speechDot1 = document.querySelector(".speech-dot-1"),
speechDot2 = document.querySelector(".speech-dot-2"),
speechDot3 = document.querySelector(".speech-dot-3"),
stopwatchButton = document.querySelector(".stopwatch-button"),
stopwatchDial = document.querySelector(".stopwatch-dial"),
magicWand = document.querySelector(".magic-wand"),
magicRays = document.querySelector(".magic-rays"),
codeLines = document.querySelector(".code-lines"),
codeLinesMarkup = document.querySelectorAll(".code-lines rect");
TweenMax.set(svg, {
visibility: "visible"
});
TweenMax.set([speechDot1, speechDot2, speechDot3], {
opacity: 0,
y: -2
});
TweenMax.set([bgDot, bgStar], {
opacity: 0,
scale: 0,
transformOrigin: "50% 50%"
});
TweenMax.set(cloudArrows, {
scale: 0.9,
rotation: 0,
transformOrigin: "50% 50%"
});
var tlBlobs = new TimelineMax({
repeat: -1,
yoyo: true
});
tlBlobs.to(blobs, 3, {
x: -15,
ease: Power2.easeInOut
});
var tlCloudArrows = new TimelineMax({
repeat: -1
});
tlCloudArrows.to(cloudArrows, 3, {
rotation: 360,
ease: Power0.easeOut
});
var tlCloudShape = new TimelineMax({
repeat: -1,
yoyo: true
});
tlCloudShape.to(cloudShape, 1.2, {
y: -5,
ease: Power1.easeInOut
});
var tlSpeechDots = new TimelineMax({
repeat: -1,
repeatDelay: 2
});
tlSpeechDots
.to(speechDot1, 0.2, {
opacity: 1,
y: 0,
ease: Power4.easeIn
})
.to(speechDot2, 0.2, {
opacity: 1,
y: 0,
ease: Power4.easeIn
})
.to(speechDot3, 0.2, {
opacity: 1,
y: 0,
ease: Power4.easeIn
});
var tlBgDot = new TimelineMax({
repeat: -1,
yoyo: true,
repeatDelay: 0,
delay: 0
});
for (i = 0; i < bgDot.length; i++) {
var dot = bgDot[i],
delay = getRandom(1, 5),
tlDot = new TimelineMax({ delay: delay });
tlDot.to(dot, 1, {
opacity: 1,
scale: 1,
ease: Power1.easeIn
});
tlBgDot.add(tlDot, "0");
}
var tlBgStar = new TimelineMax({
repeat: -1,
yoyo: true,
repeatDelay: 0,
delay: 1.5
});
for (i = 0; i < bgStar.length; i++) {
var star = bgStar[i],
delay = getRandom(1, 5),
tlStar = new TimelineMax({ delay: delay });
tlStar.to(star, 1, {
opacity: 1,
scale: 1,
ease: Power1.easeIn
});
tlBgStar.add(tlStar, "0");
}
TweenMax.set(stopwatchButton, {
y: -4
});
TweenMax.set(stopwatchDial, {
transformOrigin: "50% 50%"
});
var tlStopwatchButtonStart = new TimelineMax({
repeat: 0
});
tlStopwatchButtonStart.to(stopwatchButton, 0.3, {
y: 0,
ease: Power2.easeIn
});
var tlStopwatchButtonEnd = new TimelineMax({
repeat: 0
});
tlStopwatchButtonEnd
.to(stopwatchButton, 0.2, {
y: +2,
ease: Power0.easeIn
})
.to(stopwatchButton, 0.6, {
y: -4,
ease: Power4.easeOut
});
var tlStopwatchDial = new TimelineMax({
repeat: 1
});
tlStopwatchDial.to(stopwatchDial, 1, {
rotation: 360,
ease: Power0.easeIn
});
var tlStopwatch = new TimelineMax({
repeat: -1,
repeatDelay: 2
});
tlStopwatch
.add(tlStopwatchButtonStart)
.add(tlStopwatchDial)
.add(tlStopwatchButtonEnd, '-=0.4');
TweenMax.set([magicRays, magicWand], {
transformOrigin: "50% 50%"
});
TweenMax.set(magicRays, {
opacity: 0,
scale: 0.7
});
var tlMagicRays = new TimelineMax({
repeat: 0,
yoyo: true
});
tlMagicRays.to(magicRays, 0.5, {
scale: 1.1,
opacity: 1,
ease: Power4.easeOut
});
var tlMagicWand = new TimelineMax({
repeat: 3,
yoyo: true
});
tlMagicWand.to(magicWand, 0.3, {
rotation: "+=10",
ease: Power1.easeIn
});
var tlMagic = new TimelineMax({
repeat: -1,
repeatDelay: 2
});
tlMagic.add(tlMagicWand).add(tlMagicRays, "-=0.15");
function getRandom(min, max) {
return min + Math.random() * (max - min);
}
var tlDiamond = new TimelineMax({
repeat: -1,
repeatDelay: 2,
yoyo: true
});
tlDiamond
.to(diamondFace1, 0.2, {
fill: "#6df2e2",
ease: Power0.easeOut
})
.to(diamondFace2, 0.2, {
fill: "#00cbb8",
ease: Power0.easeOut
})
.to(diamondFace3, 0.2, {
fill: "#caf9f1",
ease: Power0.easeOut
})
.to(diamondFace4, 0.2, {
fill: "#aff9ee",
ease: Power0.easeOut
});
TweenMax.set(cog, {
transformOrigin: "50% 50%"
});
var tlCog = new TimelineMax({
repeat: -1
});
tlCog.to(cog, 4, {
rotation: 360,
ease: SteppedEase.config(12)
});
TweenMax.set([responsiveScreen1, responsiveScreen2, responsiveScreen3], {
transformOrigin: "50% 50%"
});
var tlResponsiveScreen1 = new TimelineMax({
repeat: 0
});
tlResponsiveScreen1
.to(responsiveScreen1, 0.3, {
scale: 1.1,
ease: Power0.easeOut
})
.to(responsiveScreen1, 0.5, {
scale: 1,
ease: Power0.easeOut
});
var tlResponsiveScreen2 = new TimelineMax({
repeat: 0
});
tlResponsiveScreen2
.to(responsiveScreen2, 0.3, {
scale: 1.2,
ease: Power0.easeOut
})
.to(responsiveScreen2, 0.5, {
scale: 1,
ease: Power0.easeOut
});
var tlResponsiveScreen3 = new TimelineMax({
repeat: 0
});
tlResponsiveScreen3
.to(responsiveScreen3, 0.3, {
scale: 1.2,
ease: Power0.easeOut
})
.to(responsiveScreen3, 0.5, {
scale: 1,
ease: Power0.easeOut
});
var tlResponsiveScreen = new TimelineMax({
repeat: -1,
repeatDelay: 2
});
tlResponsiveScreen
.add(tlResponsiveScreen1)
.add(tlResponsiveScreen2, "0.7")
.add(tlResponsiveScreen3, "1.4");
var tlCodeLinesMarkup = new TimelineMax({
repeat: -1,
repeatDelay: 0.5
});
tlCodeLinesMarkup.staggerFromTo(codeLinesMarkup, 0.1, {opacity:0}, {opacity:1,ease: Power0.easeNone}, 0.3);
Also see: Tab Triggers