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 className="main-svg" tabIndex="-1" viewBox="0 0 1920 1080" >
<g transform="translate(0 -350)">
<svg xmlns="http://www.w3.org/2000/svg" width="499" x="710px" y="376.5px" height="183" viewBox="0 0 499 183">
<path id="arc-1" fill="#FFFFFE" fillRule="evenodd" d="M404.607 52.91C359.34 19.27 305.532 1.487 248.998 1.487c-56.534 0-110.343 17.783-155.61 51.423C49 85.898 16.699 131.056-.027 183.5 15.792 130.538 48.22 85.205 92.78 52.09 138.224 18.315 192.245.464 248.998.464c56.752 0 110.774 17.85 156.218 51.626 44.56 33.115 76.99 78.448 93.784 131.1-17.692-52.134-50.004-97.292-94.393-130.28z" />
<path id="handle-1" fill="#FFFFFE" fillRule="evenodd" d="M55.229 10.181c-17.72 0-35.419 1.813-52.608 5.39L.536 5.604C18.41 1.886 36.813 0 55.229 0c101.228 0 192.486 56.06 238.164 146.303l-9.1 4.59C240.354 64.099 152.585 10.18 55.228 10.18z" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="482" x="718.8px" y="383.4px" height="185" viewBox="-10 -10 482 185">
<path id="arc-2" fill="#FFFFFE" fillRule="evenodd" d="M230.443 1.448c-104.116 0-196.839 65.97-230.727 164.16C32.779 66.675 125.89.427 230.443.427c104.554 0 197.665 66.248 231.7 164.847C427.283 67.418 334.56 1.448 230.443 1.448z" />
<path id="handle-2" fill="#FFFFFE" fillRule="evenodd" d="M6.805 14.357A6.697 6.697 0 1 1 6.804.963a6.697 6.697 0 0 1 0 13.394z" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" x="746.6px" y="718.4px" width="428" height="149" viewBox="0 0 428 149">
<path id="arc-4" fill="#FFFFFE" fillRule="evenodd" d="M82.89 107.117C45.24 80.552 16.788 43.784.607.79l.958-.36c16.107 42.803 44.431 79.405 81.913 105.85 38.332 27.045 83.466 41.34 130.522 41.34s92.19-14.295 130.522-41.34C382.004 79.835 410.328 43.233 426.435.43l.958.36c-16.18 42.995-44.634 79.763-82.283 106.328-38.505 27.165-83.841 41.526-131.11 41.526-47.269 0-92.605-14.361-131.11-41.526z" />
</svg>
<svg id="handle-4" xmlns="http://www.w3.org/2000/svg" x="886.8px" y="810.4px" width="222" height="62" viewBox="0 0 222 62">
<path fill="#FFFFFE" fillRule="evenodd" d="M.786 49.151l3.227-9.755c22.594 7.584 46.25 11.43 70.306 11.43 51.128 0 101.04-17.912 140.543-50.433l6.46 7.962c-41.32 34.019-93.527 52.752-147.003 52.752-25.154 0-49.894-4.022-73.533-11.956z" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" x="728.8px" y="718.4px" width="461" height="165" viewBox="0 0 461 165">
<path id="arc-5" fill="#FFFFFE" fillRule="evenodd" d="M-.25-.236c34.987 97.85 127.531 163.82 231.246 163.82 103.714 0 196.259-65.97 230.275-164.155-33.196 98.932-126.126 165.178-230.275 165.178-104.15 0-197.08-66.246-231.246-164.843z" />
</svg>
<svg id="handle-5" xmlns="http://www.w3.org/2000/svg" x="771.6px" y="795.2px" width="15" height="15" viewBox="0 0 15 15">
<path fill="#FFFFFE" fillRule="evenodd" d="M7.751 14.5a7.144 7.144 0 1 1 0-14.287 7.144 7.144 0 0 1 0 14.287z" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" x="710.9px" y="718.4px" width="498" height="182" viewBox="0 0 498 182">
<path id="arc-6" fill="#FFFFFE" fillRule="evenodd" d="M93.633 130.212C49.173 97.27 16.758 52.156-.107-.26c17.772 51.9 50.062 96.839 94.349 129.652 45.172 33.47 98.84 51.16 155.202 51.16 56.363 0 110.031-17.69 155.203-51.16C448.934 96.578 481.224 51.64 498.02-.57c-15.898 52.727-48.305 97.841-92.765 130.783-45.35 33.598-99.228 51.36-155.81 51.36-56.583 0-110.462-17.762-155.812-51.36z" />
</svg>
<svg id="handle-5" xmlns="http://www.w3.org/2000/svg" x="1073.4px" y="747px" width="129" height="131" viewBox="0 0 129 131">
<path fill="#FFFFFE" fillRule="evenodd" d="M.393 121.229C52.64 95.535 95.01 52.482 119.69 0l9.273 4.317C103.294 58.88 59.25 103.643 4.931 130.357L.393 121.23z" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" x="746.6px" y="410.4px" width="428" height="149" viewBox="0 0 428 149">
<path id="arc-3" fill="#FFFFFE" fillRule="evenodd" d="M344.643 42.76C306.298 15.71 261.123 1.412 214 1.412c-47.123 0-92.298 14.298-130.643 41.348C45.853 69.22 17.57 105.82 1.564 148.607l-.957-.357c16.078-42.98 44.49-79.747 82.16-106.322C121.286 14.756 166.667.393 214 .393c47.334 0 92.714 14.363 131.233 41.535 37.67 26.575 66.082 63.341 82.16 106.322l-.957.357C410.43 105.82 382.146 69.22 344.643 42.76z" />
</svg>
<svg id="handle-3" xmlns="http://www.w3.org/2000/svg" x="776.1px" y="408.6px" width="151" height="95" viewBox="0 0 151 95">
<path fill="#FFFFFE" fillRule="evenodd" d="M.071 88.112C36.804 40.642 89.531 9.566 148.543.607l1.528 10.085C93.661 19.257 43.25 48.97 8.128 94.357L.071 88.112z" />
</svg>
<svg x="998px" y="451px" xmlns="http://www.w3.org/2000/svg" width="109" height="96" viewBox="0 0 109 96">
<g fill="none" fillRule="evenodd">
<path stroke="#FFF" strokeLinecap="square" d="M67.5 15.5l11 39M59.5 17.5l-41 24" opacity=".247" />
<path fill="#FFF" d="M57 10c0-5.513 4.487-10 10-10s10 4.487 10 10a9.973 9.973 0 0 1-3.246 7.367l.01.009-.324.273c-.021.018-.045.032-.066.05a10.848 10.848 0 0 1-1.308.916c-.045.027-.09.051-.133.078a9.728 9.728 0 0 1-.684.355c-.018.01-.034.016-.052.025-.76.352-1.571.611-2.418.766l-.067.01c-.263.046-.53.082-.8.106l-.097.01c-.268.02-.54.035-.815.035a10.1 10.1 0 0 1-.91-.043c-.267-.024-.53-.06-.79-.104-.024-.004-.047-.01-.07-.013a9.853 9.853 0 0 1-3.125-1.125 9.221 9.221 0 0 1-.735-.456c-.068-.045-.134-.095-.2-.143a8.154 8.154 0 0 1-.468-.357c-.034-.026-.071-.051-.105-.078l-.332-.279.01-.008A9.968 9.968 0 0 1 57 10zm19.272 0c0-5.114-4.158-9.272-9.272-9.272S57.728 4.886 57.728 10a9.248 9.248 0 0 0 3.123 6.932c.107-.073.213-.14.325-.196l3.079-1.539a.808.808 0 0 0 .447-.724v-1.076a7.378 7.378 0 0 1-1.175-2.16 1.32 1.32 0 0 1-.758-1.196V8.75c0-.314.115-.619.321-.86V6.192c-.018-.188-.085-1.253.685-2.132.67-.764 1.755-1.153 3.225-1.153 1.47 0 2.555.39 3.225 1.153.77.879.703 1.944.685 2.132V7.89c.206.24.321.547.321.862v1.289c0 .401-.18.774-.486 1.026a6.777 6.777 0 0 1-1.126 2.323v1.052c0 .297.163.57.422.713l2.877 1.567c.09.05.183.108.273.174A9.254 9.254 0 0 0 76.271 10zM0 48c0-5.513 4.487-10 10-10s10 4.487 10 10a9.973 9.973 0 0 1-3.246 7.367l.01.009-.324.273c-.021.018-.045.032-.066.05a10.848 10.848 0 0 1-1.308.916c-.045.027-.09.051-.133.078a9.728 9.728 0 0 1-.684.355c-.018.01-.034.016-.052.025-.76.352-1.571.611-2.418.766l-.067.01c-.263.046-.53.082-.8.106l-.097.01c-.268.02-.54.035-.815.035a10.1 10.1 0 0 1-.808-.035 10.463 10.463 0 0 1-.893-.112c-.023-.004-.046-.01-.07-.013a9.853 9.853 0 0 1-3.124-1.125 9.221 9.221 0 0 1-.735-.456c-.068-.045-.134-.095-.2-.143a8.154 8.154 0 0 1-.468-.357c-.034-.026-.071-.051-.105-.078l-.332-.279.01-.008A9.968 9.968 0 0 1 0 48zm19.272 0c0-5.114-4.158-9.272-9.272-9.272S.728 42.886.728 48a9.248 9.248 0 0 0 3.123 6.932c.107-.073.213-.14.325-.196l3.079-1.539a.808.808 0 0 0 .447-.724v-1.076a7.378 7.378 0 0 1-1.175-2.16 1.32 1.32 0 0 1-.758-1.196v-1.29c0-.314.115-.619.321-.86v-1.698c-.018-.188-.085-1.253.685-2.132.67-.764 1.755-1.153 3.225-1.153 1.47 0 2.555.39 3.225 1.153.77.879.703 1.944.685 2.132v1.697c.206.24.321.547.321.862v1.289c0 .401-.18.774-.486 1.026a6.777 6.777 0 0 1-1.126 2.323v1.052c0 .297.163.57.422.713l2.877 1.567c.09.05.183.108.273.174A9.254 9.254 0 0 0 19.271 48z" />
<g fill="#887D57">
<path d="M108.5 95.5v-1.692h-10V95.5z" />
<path d="M108.513 84.577h-1.692v10h1.692zM109 43h-1.692v10H109z" />
<path d="M98.077 42.987v1.692h10v-1.692z" />
<g>
<path d="M57 95h1.692V85H57z" />
<path d="M67.923 95.013V93.32h-10v1.692z" />
</g>
<g>
<path d="M56.5 42.5v1.692h10V42.5z" />
<path d="M56.487 53.423h1.692v-10h-1.692z" />
</g>
</g>
<path fill="#FFF" d="M67 69c0-8.27 6.73-15 15-15s15 6.73 15 15a14.96 14.96 0 0 1-4.869 11.05l.014.014-.485.41c-.032.026-.067.047-.099.075a22.572 22.572 0 0 1-1.065.804 15.2 15.2 0 0 1-.897.57c-.067.04-.134.077-.2.117-.333.189-.677.37-1.025.532l-.078.038c-1.14.527-2.357.916-3.627 1.148l-.101.016c-.394.07-.794.122-1.199.16-.048.005-.099.007-.146.013-.403.032-.81.053-1.223.053-.408 0-.812-.021-1.212-.053-.05-.006-.101-.008-.152-.011-.402-.037-.796-.09-1.187-.157-.035-.005-.07-.014-.105-.019a14.78 14.78 0 0 1-3.699-1.177 15.54 15.54 0 0 1-.988-.511c-.08-.046-.16-.09-.24-.139a13.832 13.832 0 0 1-.863-.546c-.1-.067-.2-.14-.298-.213-.24-.17-.476-.349-.703-.535-.05-.04-.107-.077-.157-.118l-.498-.418.016-.013A14.952 14.952 0 0 1 67 69zm28.908 0c0-7.67-6.238-13.908-13.908-13.908-7.67 0-13.908 6.238-13.908 13.908 0 4.133 1.814 7.85 4.685 10.398.16-.11.32-.211.488-.293l4.617-2.31c.413-.207.671-.622.671-1.086v-1.614c-.106-.13-.22-.28-.335-.445a11.067 11.067 0 0 1-1.428-2.793 1.98 1.98 0 0 1-1.137-1.796v-1.933c0-.472.173-.93.482-1.292V63.29c-.027-.282-.128-1.88 1.028-3.199 1.004-1.145 2.632-1.729 4.837-1.729 2.205 0 3.832.584 4.837 1.73 1.155 1.317 1.055 2.916 1.028 3.198v2.546c.309.36.482.82.482 1.292v1.933c0 .602-.27 1.161-.73 1.54-.442 1.731-1.35 3.041-1.688 3.483v1.58c0 .445.244.854.633 1.068l4.315 2.351c.136.075.274.163.41.262A13.88 13.88 0 0 0 95.907 69z" />
</g>
</svg>
<svg id="circle-4" xmlns="http://www.w3.org/2000/svg" x="1010px" y="463px" width="9" height="9" viewBox="0 0 9 9">
<circle cx="934.5" cy="493.5" r="4.5" fill="#FFF" fillRule="evenodd" transform="translate(-930 -489)" />
</svg>
<svg id="circle-5" x="896px" y="458px" xmlns="http://www.w3.org/2000/svg" width="15px" height="15px" viewBox="0 0 15 15">
<circle cx="546.5" cy="666.5" r="6.5" fill="#FFF" fillRule="evenodd" transform="translate(-540 -660)" />
</svg>
<svg id="circle-6" x="840px" y="509px" xmlns="http://www.w3.org/2000/svg" width="15px" height="15px" viewBox="0 0 15 15">
<circle cx="546.5" cy="666.5" r="6.5" fill="#FFF" fillRule="evenodd" transform="translate(-540 -660)" />
</svg>
<svg id="circle-7" xmlns="http://www.w3.org/2000/svg" x="930px" y="489px" width="9" height="9" viewBox="0 0 9 9">
<circle cx="934.5" cy="493.5" r="4.5" fill="#FFF" fillRule="evenodd" transform="translate(-930 -489)" />
</svg>
<svg id="circle-8" xmlns="http://www.w3.org/2000/svg" x="810px" y="738px" width="9" height="9" viewBox="0 0 9 9">
<circle cx="934.5" cy="493.5" r="4.5" fill="#FFF" fillRule="evenodd" transform="translate(-930 -489)" />
</svg>
<svg id="circle-9" x="1090px" y="739px" xmlns="http://www.w3.org/2000/svg" width="15px" height="15px" viewBox="0 0 15 15">
<circle cx="546.5" cy="666.5" r="6.5" fill="#FFF" fillRule="evenodd" transform="translate(-540 -660)" />
</svg>
<svg id="circle-10" xmlns="http://www.w3.org/2000/svg" x="1080px" y="789px" width="9" height="9" viewBox="0 0 9 9">
<circle cx="934.5" cy="493.5" r="4.5" fill="#FFF" fillRule="evenodd" transform="translate(-930 -489)" />
</svg>
<svg id="circle-11" x="958px" y="806px" xmlns="http://www.w3.org/2000/svg" width="15px" height="15px" viewBox="0 0 15 15">
<circle cx="546.5" cy="666.5" r="6.5" fill="#FFF" fillRule="evenodd" transform="translate(-540 -660)" />
</svg>
</g>
</svg>
.main-svg {
z-index:0;
max-height: 100vh;
max-width: 100vw;
}
body {
height: 100vh;
width: 100vw;
background-image: radial-gradient(circle at 50% 52%, #585178, #26223a);
margin: 0;
padding: 0;
overflow: hidden;
}
const values1 = [{x: 404.607, y: 52.91}
,
{x: 359.34, y: 19.27}
,
{x: 305.532, y: 1.487}
,
{x: 248.998, y: 1.487}
,
{x: 192.464, y: 1.487}
,
{x: 138.65499999999997, y: 19.270000000000003}
,
{x: 93.38799999999998, y: 52.910000000000004}
,
{x: 49, y: 85.898}
,
{x: 16.699, y: 131.056}
,
{x: -0.027, y: 183.5}
,
{x: 15.792, y: 130.538}
,
{x: 48.22, y: 85.205}
,
{x: 92.78, y: 52.09}
,
{x: 138.224, y: 18.315}
,
{x: 192.245, y: 0.464}
,
{x: 248.998, y: 0.464}
,
{x: 305.75, y: 0.464}
,
{x: 359.772, y: 18.314}
,
{x: 405.216, y: 52.089999999999996}
,
{x: 449.776, y: 85.205}
,
{x: 482.206, y: 130.53799999999998}
,
{x: 499, y: 183.19}
,
{x: 481.308, y: 131.05599999999998}
,
{x: 448.996, y: 85.898}
,
{x: 404.60699999999997, y: 52.91}];
const values2 = [{ x: 230.33550050485135, y: 0.4850000004768371 },
{ x: 126.21950050485135, y: 0.4850000004768371 },
{ x: 33.496500504851355, y: 66.45500000047683 },
{ x: -0.39149949514865057, y: 164.64500000047684 },
{ x: 32.671500504851345, y: 65.71200000047683 },
{ x: 125.78250050485134, y: -0.5359999995231628 },
{ x: 230.33550050485135, y: -0.5359999995231628 },
{ x: 334.88950050485136, y: -0.5359999995231628 },
{ x: 428.00050050485135, y: 65.71200000047685 },
{ x: 462.03550050485137, y: 164.31100000047684 },
{ x: 427.17550050485136, y: 66.45500000047684 },
{ x: 334.45250050485134, y: 0.4850000004768371 },
{ x: 230.33550050485135, y: 0.4850000004768371 }];
TweenMax.set("#handle-2", {
x: values2[0].x, y: values2[0].y, xPercent: -50, yPercent: -50,
});
TweenMax.set("#handle-1", {
rotation: '20',
x: values1[0].x,
y: values1[0].y,
xPercent: -70,
yPercent: -30,
});
TweenMax.to("#handle-1", 7, {bezier:{type:'cubic', values:values1}, ease:Linear.easeNone, repeat:-1});
TweenMax.to("#handle-2", 7, {
transformOrigin: '50% 50%',
bezier:{type:'cubic', values:values2}, ease:Linear.easeNone, repeat:-1});
/* This Pen Loads the Following
TweenMax: latest version
-TweenLite
-TweenMax
-TimelineLite
-TimelineMax
-CSSPlugin
-BezierPlugin
-DirectionalRotationPlugin
-AttrPlugin
-RoundPropsPlugin
-EasePack
Please use the minimal amount of code possible to recreate the problem you are experiencing.
*/
Also see: Tab Triggers