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 Skypack, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ES6 import
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.
<about>[[[https://codepen.io/asistapl/pen/ddxXey]]]</about>
<svg viewBox="0 0 600 600">
<defs>
<path id="SVGID_1_" d="M600 300c0 165.686-134.314 300-300 300S0 465.686 0 300C0 134.315 134.314 0 300 0s300 134.315 300 300"/>
</defs>
<clipPath id="SVGID_2_">
<use xlink:href="#SVGID_1_" overflow="visible"/>
</clipPath>
<g clip-path="url(#SVGID_2_)">
<defs>
<path id="SVGID_3_" d="M0 0h600v600H0z"/>
</defs>
<clipPath id="SVGID_4_">
<use xlink:href="#SVGID_3_" overflow="visible"/>
</clipPath>
<path d="M600 300c0 165.686-134.314 300-300 300S0 465.686 0 300C0 134.315 134.314 0 300 0s300 134.315 300 300" clip-path="url(#SVGID_4_)"/>
</g>
<g clip-path="url(#SVGID_2_)">
<path d="M600 602H0V-4h600v606z" fill="#00ACC1"/>
<path d="M630.954 510.703c0 100.685-148.172 96.322-330.952 96.322S-30.95 615.258-30.95 510.703C-30.95 457.505 121.02 386 303.8 386s327.154 71.505 327.154 124.703z" fill="#FFB74D"/>
<g id="moses-sea-moses">
<g id="moses-sea-arm-right">
<path d="M415.63 149.988l1.986-8.24c.852-3.535 3.004-6.62 6.03-8.64l3.244-2.165c1.21-.81 2.83-.612 3.814.463l1.605 1.755-6.462 4.192 11.112-9.034c2.704-2.2 6.656-1.897 8.996.686l4.506 4.975c2.175 2.4 2.27 6.028.225 8.54l-3.25 3.993c-.44.54-3.063 3.66-4.74 5.547-.76.854-1.62 1.6-2.573 2.228l-8.34 5.5c-1.05.866-2.215 1.58-3.464 2.12l-13.65 5.896.96-17.816z" fill="#FFC570"/>
<path fill="#FFF" d="M323.308 202.647l65.915 19.95 39.71-41.428-12.54-34.875-36.29 36.927-27.118-4.796L342 176.484z"/>
<path fill="#E06A46" d="M383.186 297.298l-64.017-63.19V167.8l60.13 14.86z"/>
</g>
<g id="moses-sea-arm-left">
<path d="M183.733 148.906l-2.362-12.796c-.13-.717-.48-1.378-.995-1.893l-7.662-7.653-4.727 4.64 4.727 5.33-9.176-9.762c-2.488-2.646-6.668-2.72-9.247-.163l-4.537 4.496c-2.265 2.245-2.55 5.807-.674 8.385l3.926 5.394 14.56 13.388c.675.622 1.436 1.145 2.26 1.555l13.907 6.92v-17.84z" fill="#FFC570"/>
<path fill="#FFF" d="M272.424 203.554l-66.893 16.373-37.422-43.504 14.4-34.15 34.25 38.828 38.41-4.677z"/>
<path fill="#E06A46" d="M276.19 169.168L279.255 236 223.6 281.89l-17.01 12.65 10.05-114.11z"/>
<path d="M170.555 64.244c-1.382-11.397 13.978-23.416 24.748-18.98 13.595 5.598 11.576 21.633 3.485 33.838l1.184-1.864-94.938 149.486" fill="none" stroke="#3E2723" stroke-width="6" stroke-miterlimit="10"/>
<path d="M169.33 132.934l-4.385-.76c-.494-.084-.897-.44-1.044-.92-.386-1.262.042-2.633 1.078-3.452l.486-.384c.54-.426 1.2-.667 1.886-.688l5.362-.166 3.296 7.686-6.68-1.316z" fill="#FFC570"/>
</g>
<path fill="#828282" d="M322.517 112.69l-2.137 61.524h-45l-.727-61.154z"/>
<path fill="#FFF" d="M372.592 453H223.26l23.5-171.11 33.15-115.022h36.486L348.76 281.89z"/>
<path fill="#FFD79B" d="M316.396 166.868l-18.243 27.123-18.244-27.122z"/>
<path fill="#E06A46" d="M369.93 400.42l-53.88-.71.35-232.84 19.41 4.16 14.79 94.55zM223.6 281.89l-17.02 12.8.01-.15zM280.26 399.71l-57 1.4 22.73-136.07-.26.19 14.74-94.19 19.44-4.17z"/>
<path fill="#CC603F" d="M335.81 400.42l-19.764-.71.35-232.842 19.414 2.3z"/>
<path d="M324.45 132.036c-1.313 17.002-11.73 30.877-26.202 30.877s-23.976-13.97-26.2-30.877c-3.06-23.248 11.73-30.877 26.2-30.877s28.085 6.457 26.2 30.876z" fill="#FFC570"/>
<path fill="#CC603F" d="M260.496 400.42l19.764-.71-.35-232.842-19.414 2.3z"/>
<path fill="#929292" d="M274.653 144.345l23.48 10.405 23.58-10.405-9.102 49.646h-28.05z"/>
<path d="M320.38 188.854l1.685-73.726-47.865.428 2.488 73.298h-11.68l3.898-74.328c.684-18.084 13.53-32.336 29.15-32.336 7.72 0 14.767 3.48 19.998 9.193 5.237 5.72 8.658 13.663 9.124 22.59l4.906 74.882H320.38z" fill="#FFF"/>
<path fill="#C64C4C" d="M352.884 279.742h-110.46l3.564-14.7 104.607.533z"/>
<path d="M327.75 116.594h-59.194c-2.156 0-3.903-1.747-3.903-3.903 0-2.155 1.747-3.902 3.903-3.902h59.194c2.156 0 3.903 1.747 3.903 3.903 0 2.156-1.748 3.904-3.903 3.904z" fill="#FF7043"/>
<path d="M279.91 166.868z" fill="#FFD79B"/>
<path fill="#929292" d="M302.52 117.102v2.825h16.65l-.707-2.825zM294.397 117.102v2.825h-16.65l.708-2.825z"/>
<ellipse cx="298.585" cy="135.522" rx="5.07" ry="4.44" fill="#D9A75F"/>
<path fill="#FFF" d="M317.916 129.16H303.47l2.428-4.795h9.263z"/>
<path d="M313.836 126.38c0 1.194-.642 2.235-1.598 2.78h-3.088c-.957-.545-1.598-1.586-1.598-2.78 0-.762.26-1.464.702-2.015h4.88c.44.55.702 1.253.702 2.016z" fill="#212121"/>
<path fill="#FFF" d="M279.254 129.16H293.7l-2.43-4.795h-9.262z"/>
<path d="M283.334 126.38c0 1.194.642 2.235 1.598 2.78h3.088c.957-.545 1.598-1.586 1.598-2.78 0-.762-.26-1.464-.702-2.015h-4.88c-.44.55-.702 1.253-.702 2.016z" fill="#212121"/>
<path fill="#675451" d="M303.655 149.253h-10.14l-2.42-1.287h14.076z"/>
<path fill="#929292" d="M298.153 141.608v2.737L309.26 146l1.433 5.75 10.035-5.07z"/>
<path fill="#929292" d="M298.988 141.608v2.737L287.882 146l-1.434 5.75-10.257-5.07z"/>
</g>
<g id="moses-sea-water">
<path d="M802.5 744.87H343.1c.08-17.46 1.32-102.82 3.69-119.96 2.68-19.53 6.83-38.8 12.36-57.64.97-3.32 1.99-6.63 3.05-9.93 14.1-43.77 35.76-85.09 64.15-122.08 20.1-26.19 37.58-53.1 47.3-75.13.06-.14.13-.29.19-.43 10.5-23.68 24.01-45.16 39.93-63.88 16.02-18.82 34.49-34.83 54.79-47.42 19.17-11.9 41.31-18.11 63.87-18.11H802.5v514.58zm-1005 0h459.4c-.08-17.46-1.32-102.82-3.69-119.96-2.68-19.53-6.83-38.8-12.36-57.64-.97-3.32-1.99-6.63-3.05-9.93-14.1-43.77-35.76-85.09-64.15-122.08-20.1-26.19-37.58-53.1-47.3-75.13-.06-.14-.13-.29-.19-.43-10.5-23.68-24.01-45.16-39.93-63.88C70.21 277 51.74 260.99 31.44 248.4c-19.17-11.9-41.31-18.11-63.87-18.11H-202.5v514.58z" fill="#00838F"/>
<path d="M802.5 307.71H604.97c-26.69-1.63-52.95 4.19-76.98 16.55-24.35 12.52-46.41 31.74-64.28 56.7-8.97 12.52-15.92 26.83-20.63 42.16-4.71 15.34-7.18 31.71-7.18 48.37v273.38h366.6V307.71zm-1005 437.16h366.6V471.49c0-16.66-2.47-33.03-7.18-48.37-4.71-15.33-11.66-29.64-20.63-42.16-17.87-24.96-39.93-44.18-64.28-56.7-24.03-12.36-50.29-18.18-76.98-16.55H-202.5v437.16z" fill="#0097A7"/>
<path d="M802.5 396.53v348.34h-1005V396.53c157.54-.14 202.54-.21 204.76-.21 31.73 0 63.35 14.36 86.57 43.83 5.03 6.37 9.66 13.45 13.81 21.24 5.32 7.87 11.01 15.18 16.99 21.97.18.2.36.41.55.61 13.53 15.3 28.5 27.94 43.92 38.36 17.96 12.15 36.51 21.3 54.09 28.14 6.7 2.62 13.27 4.89 19.61 6.87 13.702 4.292 26.336 7.196 37.015 9.11 16.652 2.987 33.718 2.987 50.37 0 10.68-1.914 23.313-4.818 37.015-9.11 6.34-1.98 12.91-4.25 19.61-6.87 17.58-6.84 36.13-15.99 54.09-28.14 15.42-10.42 30.39-23.06 43.92-38.36.19-.2.37-.41.55-.61 5.98-6.79 11.67-14.1 16.99-21.97 4.15-7.79 8.78-14.87 13.81-21.24 23.22-29.47 54.84-43.83 86.57-43.83 2.22 0 47.22.07 204.76.21z" fill="#29A8B5"/>
<path d="M802.5 490.17v254.7h-1005v-254.7c20.03 5.25 251.24.66 242.09-16.88-2.13-4.08-5.28-6.93-8.81-8.22l-.33-.12c-1.007-.366-1.7-1.318-1.7-2.39-.004-6.184.936-12.138 2.68-17.41 1.73-5.25 4.25-9.81 7.4-13.19 7.96-8.56 18.37-7.89 25.91 1.67l6.61 8.38c5.32 6.75 12.84 5.83 17.48-1.86.27-.42.51-.87.75-1.33v-.01c2.15-4.18 3.21-9.04 3.21-13.91 0-4.9-1.07-9.81-3.25-14-4.68-9.04-11.04-14.89-17.87-16.98-2.59-.8-5.12-1.71-7.57-2.72-.22-.09-.45-.15-.69-.17-20.63-2.01-36.6-16.18-36.6-33.33 0-18.55 18.66-33.58 41.67-33.58 1.2 0 2.37.05 3.53.14 11.84.92 21.67 6.4 29.85 12.59 8.16 5.91 16.38 14.06 24.3 22.85 2.99 3.31 5.94 6.72 8.83 10.13 10.984 12.97 48.55 89.87 108.488 126.79 34.61 21.317 78.434 21.317 113.044 0 59.938-36.918 97.505-113.82 108.488-126.79 2.89-3.41 5.84-6.82 8.83-10.13 7.92-8.79 16.14-16.94 24.3-22.85 8.18-6.19 18.01-11.67 29.85-12.59 1.16-.09 2.33-.14 3.53-.14 23.01 0 41.67 15.03 41.67 33.58 0 17.15-15.97 31.32-36.6 33.33-.24.02-.47.08-.69.17-2.45 1.01-4.98 1.92-7.57 2.72-6.83 2.09-13.19 7.94-17.87 16.98-2.18 4.19-3.25 9.1-3.25 14 0 4.87 1.06 9.73 3.21 13.91v.01c.24.46.48.91.75 1.33 4.64 7.69 12.16 8.61 17.48 1.86l6.61-8.38c7.54-9.56 17.95-10.23 25.91-1.67 3.15 3.38 5.67 7.94 7.4 13.19 1.744 5.272 2.684 11.226 2.68 17.41 0 1.072-.693 2.024-1.7 2.39l-.33.12c-3.53 1.29-6.68 4.14-8.81 8.22-9.15 17.54 222.06 22.13 242.09 16.88z" fill="#C2EFF5"/>
<path d="M802.5 571.63v173.24h-1005V571.63l187.91-.82c13.09-.26 25.94 2.84 37.78 8.43 5.75 2.71 12.14 4.09 17.72 2.79 8.22-1.9 19.04-4.03 29.91-10.67 10.86-6.64 31.93 21.7 49.9 7.91 8.93-6.84-3.15-40.39-11.52-60.58-1.44-3.49-2.15-7.16-2.15-10.81 0-6.51 2.25-12.94 6.56-18.12 1.94-2.32 4.16-4.25 6.57-5.79 10.94-6.94 25.75-5.7 35.36 4.09 2.72 2.77 5.59 5.69 8.56 8.7 21.53 21.89 47.67 48.23 54.09 53.71 7.47 6.38 15.03 11.98 22.66 16.8l.584.368c35.753 22.42 81.38 22.42 117.132 0l.584-.368c7.63-4.82 15.19-10.42 22.66-16.8 6.42-5.48 32.56-31.82 54.09-53.71 2.97-3.01 5.84-5.93 8.56-8.7 9.61-9.79 24.42-11.03 35.36-4.09 2.41 1.54 4.63 3.47 6.57 5.79 4.31 5.18 6.56 11.61 6.56 18.12 0 3.65-.71 7.32-2.15 10.81-8.37 20.19-20.45 53.74-11.52 60.58 17.97 13.79 39.04-14.55 49.9-7.91 10.87 6.64 21.69 8.77 29.91 10.67 5.58 1.3 11.97-.08 17.72-2.79 11.84-5.59 24.69-8.69 37.78-8.43l187.91.82z" fill="#00838F"/>
</g>
</g>
</svg>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #00838F;
}
svg {
width: 90%;
max-height: 90%;
}
const left = document.querySelector('#moses-sea-arm-left');
const right = document.querySelector('#moses-sea-arm-right');
const water = document.querySelectorAll('#moses-sea-water path');
TweenMax.set(water, {
transformOrigin: 'center'
})
TweenMax.staggerFromTo(water, 1.5, {
scaleX: 0.9,
scaleY: 1.1
}, {
scaleX: 1.1,
scaleY: 0.9,
y: -20,
yoyo: true,
repeat: -1,
ease: Power1.easeInOut
}, -.1)
TweenMax.set(left, {
transformOrigin: '159.716, 156.575'
})
TweenMax.fromTo(left, 1.5, {
rotation: 2
}, {
rotation: -5,
yoyo: true,
repeat: -1,
ease: Power1.easeInOut
})
TweenMax.set(right, {
transformOrigin: '14, 82'
})
TweenMax.fromTo(right, 1.5, {
rotation: 350
}, {
rotation: 360,
yoyo: true,
repeat: -1,
ease: Power1.easeInOut
})
Also see: Tab Triggers