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 URL's 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 it's URL and the proper URL extention.
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.
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="540" height="150" viewbox="0 0 540 150">
<!-- Silence point -->
<defs>
<circle id="circle" cy="1" cx="1" r="1"/>
<rect id="square" width="1.77" height="1.77"/>
</defs>
<!-- End of silence point -->
<!-- Entropy -->
<filter id="displacementFilter1">
<feTurbulence type="turbulence" baseFrequency="0"
numOctaves="2" result="turbulence"/>
<feDisplacementMap in2="turbulence" in="SourceGraphic"
scale="0" xChannelSelector="R" yChannelSelector="G"/>
</filter>
<filter id="displacementFilter2">
<feTurbulence type="turbulence" baseFrequency="0.5"
numOctaves="20" result="turbulence"/>
<feDisplacementMap in2="turbulence" in="SourceGraphic"
scale="100" xChannelSelector="R" yChannelSelector="G"/>
</filter>
<filter id="displacementFilter3">
<feTurbulence type="turbulence" baseFrequency="0.02"
numOctaves="2" result="turbulence"/>
<feDisplacementMap in2="turbulence" in="SourceGraphic"
scale="50" xChannelSelector="R" yChannelSelector="G"/>
</filter>
<filter id="displacementFilter4">
<feTurbulence type="turbulence" baseFrequency="0"
numOctaves="2" result="turbulence"/>
<feDisplacementMap in2="turbulence" in="SourceGraphic"
scale="0" xChannelSelector="R" yChannelSelector="G"/>
</filter>
<!-- Patterns -->
<defs>
<pattern id="pattern-circle-1" width="0.2" height="0.2" patterUnits="userSpaceOnUse">
<use xlink:href="#circle" x="2.5" y="2.5" transform="scale(0.05)" />
</pattern>
<pattern id="pattern-circle-2" width="0.3333" height="0.3333" patterUnits="userSpaceOnUse">
<use xlink:href="#circle" x="0.95" y="0.95" transform="scale(0.15)" />
</pattern>
<pattern id="pattern-square-1" width="0.3" height="0.3" patterUnits="userSpaceOnUse">
<use xlink:href="#square" x="2.65" y="2.65" transform="scale(0.1)" />
</pattern>
<pattern id="pattern-square-2" width="0.3" height="0.3" patterUnits="userSpaceOnUse">
<use xlink:href="#square" x="6.2" y="6.2" transform="scale(0.05)" />
</pattern>
<pattern id="pattern-square-3" width="0.317" height="0.317" patterUnits="userSpaceOnUse">
<use xlink:href="#square" transform="scale(0.05)" />
</pattern>
</defs>
<!-- Clip paths -->
<defs>
<clipPath id="square-h">
<use xlink:href="#square" transform="scale(28.2475)"/>
</clipPath>
<clipPath id="square-q">
<use xlink:href="#square" transform="scale(14.12375)"/>
</clipPath>
<clipPath id="square-q-sim1">
<use xlink:href="#square" x="1.77" transform="scale(14.12375)"/>
</clipPath>
<clipPath id="square-q-sim2">
<use xlink:href="#square" y="1.77" transform="scale(14.12375)"/>
</clipPath>
<clipPath id="square-q-sim3">
<use xlink:href="#square" x="1.77" y="1.77" transform="scale(14.12375)"/>
</clipPath>
<clipPath id="square-q-2h">
<use xlink:href="#square" transform="scale(28.2475 14.12375)"/>
</clipPath>
<clipPath id="square-q-2h-sim">
<use xlink:href="#square" y="1.77" transform="scale(28.2475 14.12375)"/>
</clipPath>
<clipPath id="square-q-2v">
<use xlink:href="#square" transform="scale(14.12375 28.2475)"/>
</clipPath>
<clipPath id="square-q-2v-sim">
<use xlink:href="#square" x="1.77" transform="scale(14.12375 28.2475)"/>
</clipPath>
</defs>
<!-- Masks -->
<defs>
<mask id="mask-s">
<use xlink:href="#basic-circle-18" fill="white"/>
<use xlink:href="#basic-circle-21" x="50" fill="white"/>
<use xlink:href="#basic-circle-20" y="50" fill="white"/>
<use xlink:href="#basic-circle-21" x="50" y="50" fill="white"/>
<use xlink:href="#basic-circle-20" y="100" fill="white"/>
<use xlink:href="#basic-circle-19" x="50" y="100" fill="white"/>
</mask>
<mask id="mask-u">
<use xlink:href="#basic-square-1" fill="white"/>
<use xlink:href="#basic-square-1" x="50" fill="white"/>
<use xlink:href="#basic-square-1" y="50" fill="white"/>
<use xlink:href="#basic-square-1" x="50" y="50" fill="white"/>
<use xlink:href="#basic-circle-20" y="100" fill="white"/>
<use xlink:href="#basic-circle-19" x="50" y="100" fill="white"/>
</mask>
<mask id="mask-m">
<use xlink:href="#basic-circle-21" fill="white"/>
<use xlink:href="#basic-circle-18" x="50" fill="white"/>
<use xlink:href="#basic-square-1" y="50" fill="white"/>
<use xlink:href="#basic-square-1" x="50" y="50" fill="white"/>
<use xlink:href="#basic-square-1" y="100" fill="white"/>
<use xlink:href="#basic-square-1" x="50" y="100" fill="white"/>
</mask>
<mask id="mask-a">
<use xlink:href="#basic-circle-18" fill="white"/>
<use xlink:href="#basic-circle-21" x="50" fill="white"/>
<use xlink:href="#basic-square-1" y="50" fill="white"/>
<use xlink:href="#basic-square-1" x="50" y="50" fill="white"/>
<use xlink:href="#basic-square-1" y="100" fill="white"/>
<use xlink:href="#basic-square-1" x="50" y="100" fill="white"/>
</mask>
<mask id="square-concentric-1">
<use xlink:href="#square" transform="scale(28.2475)" fill="black" />
<use xlink:href="#square" x="0.294999705" y="0.294999705" transform="scale(21.185625)" fill="white" />
<use xlink:href="#square" x="0.885" y="0.885" transform="scale(14.12375)" fill="black"/>
<use xlink:href="#square" x="2.6550" y="2.6550" transform="scale(7.061875)" fill="white"/>
</mask>
<mask id="square-concentric-2">
<use xlink:href="#square" transform="scale(28.2475)" fill="white" />
<use xlink:href="#square" x="0.294999705" y="0.294999705" transform="scale(21.185625)" fill="black" />
</mask>
<mask id="square-concentric-3">
<use xlink:href="#square" x="0.294999705" y="0.294999705" transform="scale(21.185625)" fill="white" />
<use xlink:href="#square" x="0.885" y="0.885" transform="scale(14.12375)" fill="black"/>
</mask>
<mask id="square-concentric-4">
<use xlink:href="#square" x="0.885" y="0.885" transform="scale(14.12375)" fill="white"/>
<use xlink:href="#square" x="2.6550" y="2.6550" transform="scale(7.061875)" fill="black"/>
</mask>
<mask id="square-concentric-5">
<use xlink:href="#square" transform="scale(28.2475)" fill="white" />
<use xlink:href="#square" x="0.294999705" y="0.294999705" transform="scale(21.185625)" fill="black" />
<use xlink:href="#square" x="0.885" y="0.885" transform="scale(14.12375)" fill="white"/>
<use xlink:href="#square" x="2.6550" y="2.6550" transform="scale(7.061875)" fill="black"/>
</mask>
<mask id="square-concentric-6">
<g transform="rotate(45 25 25)">
<use xlink:href="#square" transform="scale(28.2475)" fill="white" />
<use xlink:href="#square" x="0.294999705" y="0.294999705" transform="scale(21.185625)" fill="black" />
<use xlink:href="#square" x="0.885" y="0.885" transform="scale(14.12375)" fill="white"/>
<use xlink:href="#square" x="2.6550" y="2.6550" transform="scale(7.061875)" fill="black"/>
</g>
</mask>
<mask id="square-concentric-7">
<g transform="rotate(45 25 25)">
<use xlink:href="#square" x="0.885" y="0.885" transform="scale(14.12375)" fill="white"/>
<use xlink:href="#square" x="2.6550" y="2.6550" transform="scale(7.061875)" fill="black"/>
</g>
</mask>
<mask id="circle-concentric-1">
<use xlink:href="#circle" transform="scale(25)" fill="black" />
<use xlink:href="#circle" x="0.3333" y="0.3333" transform="scale(18.75)" fill="white" />
<use xlink:href="#circle" x="1" y="1" transform="scale(12.5)" fill="black" />
<use xlink:href="#circle" x="3" y="3" transform="scale(6.25)" fill="white" />
</mask>
<mask id="circle-concentric-2">
<use xlink:href="#circle" transform="scale(25)" fill="white" />
<use xlink:href="#circle" x="0.3333" y="0.3333" transform="scale(18.75)" fill="black" />
</mask>
<mask id="circle-concentric-3">
<use xlink:href="#circle" x="0.3333" y="0.3333" transform="scale(18.75)" fill="white" />
<use xlink:href="#circle" x="1" y="1" transform="scale(12.5)" fill="black" />
</mask>
<mask id="circle-concentric-4">
<use xlink:href="#circle" x="1" y="1" transform="scale(12.5)" fill="white" />
<use xlink:href="#circle" x="3" y="3" transform="scale(6.25)" fill="black" />
</mask>
<mask id="circle-concentric-5">
<use xlink:href="#circle" transform="scale(25)" fill="white" />
<use xlink:href="#circle" x="0.3333" y="0.3333" transform="scale(18.75)" fill="black" />
<use xlink:href="#circle" x="1" y="1" transform="scale(12.5)" fill="white" />
<use xlink:href="#circle" x="3" y="3" transform="scale(6.25)" fill="black" />
</mask>
<mask id="circle-concentric-6">
<g transform="translate(25 25)">
<use xlink:href="#circle" x="-0.5" y="-0.5" transform="scale(50)" fill="white" />
<use xlink:href="#circle" x="-0.4275" y="-0.4275" transform="scale(43.75)" fill="black" />
<use xlink:href="#circle" x="-0.333" y="-0.333" transform="scale(37.5)" fill="white" />
<use xlink:href="#circle" x="-0.2" y="-0.2" transform="scale(31.25)" fill="black" />
<use xlink:href="#circle" transform="scale(25)" fill="white" />
<use xlink:href="#circle" x="0.3333" y="0.3333" transform="scale(18.75)" fill="black" />
<use xlink:href="#circle" x="1" y="1" transform="scale(12.5)" fill="white" />
<use xlink:href="#circle" x="3" y="3" transform="scale(6.25)" fill="black" />
</g>
</mask>
<mask id="circle-concentric-7">
<g transform="translate(-25 -25)">
<use xlink:href="#circle" x="-0.5" y="-0.5" transform="scale(50)" fill="white" />
<use xlink:href="#circle" x="-0.4275" y="-0.4275" transform="scale(43.75)" fill="black" />
<use xlink:href="#circle" x="-0.333" y="-0.333" transform="scale(37.5)" fill="white" />
<use xlink:href="#circle" x="-0.2" y="-0.2" transform="scale(31.25)" fill="black" />
<use xlink:href="#circle" transform="scale(25)" fill="white" />
<use xlink:href="#circle" x="0.3333" y="0.3333" transform="scale(18.75)" fill="black" />
<use xlink:href="#circle" x="1" y="1" transform="scale(12.5)" fill="white" />
<use xlink:href="#circle" x="3" y="3" transform="scale(6.25)" fill="black" />
</g>
</mask>
<mask id="circle-concentric-8">
<g transform="translate(25 -25)">
<use xlink:href="#circle" x="-0.5" y="-0.5" transform="scale(50)" fill="white" />
<use xlink:href="#circle" x="-0.4275" y="-0.4275" transform="scale(43.75)" fill="black" />
<use xlink:href="#circle" x="-0.333" y="-0.333" transform="scale(37.5)" fill="white" />
<use xlink:href="#circle" x="-0.2" y="-0.2" transform="scale(31.25)" fill="black" />
<use xlink:href="#circle" transform="scale(25)" fill="white" />
<use xlink:href="#circle" x="0.3333" y="0.3333" transform="scale(18.75)" fill="black" />
<use xlink:href="#circle" x="1" y="1" transform="scale(12.5)" fill="white" />
<use xlink:href="#circle" x="3" y="3" transform="scale(6.25)" fill="black" />
</g>
</mask>
<mask id="circle-concentric-9">
<g transform="translate(-25 25)">
<use xlink:href="#circle" x="-0.5" y="-0.5" transform="scale(50)" fill="white" />
<use xlink:href="#circle" x="-0.4275" y="-0.4275" transform="scale(43.75)" fill="black" />
<use xlink:href="#circle" x="-0.333" y="-0.333" transform="scale(37.5)" fill="white" />
<use xlink:href="#circle" x="-0.2" y="-0.2" transform="scale(31.25)" fill="black" />
<use xlink:href="#circle" transform="scale(25)" fill="white" />
<use xlink:href="#circle" x="0.3333" y="0.3333" transform="scale(18.75)" fill="black" />
<use xlink:href="#circle" x="1" y="1" transform="scale(12.5)" fill="white" />
<use xlink:href="#circle" x="3" y="3" transform="scale(6.25)" fill="black" />
</g>
</mask>
</defs>
<!-- Basic circles -->
<symbol id="basic-circle-1">
<use xlink:href="#circle" transform="scale(25)"/>
</symbol>
<symbol id="basic-circle-2" clip-path="url(#square-q-2v)">
<use xlink:href="#circle" transform="scale(25)"/>
</symbol>
<symbol id="basic-circle-3" clip-path="url(#square-q-2v-sim)">
<use xlink:href="#circle" transform="scale(25)"/>
</symbol>
<symbol id="basic-circle-4" clip-path="url(#square-q-2h)">
<use xlink:href="#circle" transform="scale(25)"/>
</symbol>
<symbol id="basic-circle-5" clip-path="url(#square-q-2h-sim)">
<use xlink:href="#circle" transform="scale(25)"/>
</symbol>
<symbol id="basic-circle-6" clip-path="url(#square-h)">
<use xlink:href="#circle" x="1" transform="scale(25)"/>
</symbol>
<symbol id="basic-circle-7" clip-path="url(#square-h)">
<use xlink:href="#circle" x="-1" transform="scale(25)"/>
</symbol>
<symbol id="basic-circle-8" clip-path="url(#square-h)">
<use xlink:href="#circle" y="1" transform="scale(25)"/>
</symbol>
<symbol id="basic-circle-9" clip-path="url(#square-h)">
<use xlink:href="#circle" y="-1" transform="scale(25)"/>
</symbol>
<symbol id="basic-circle-10" clip-path="url(#square-q)">
<use xlink:href="#circle" transform="scale(25)"/>
</symbol>
<symbol id="basic-circle-11" clip-path="url(#square-q-sim1)">
<use xlink:href="#circle" transform="scale(25)"/>
</symbol>
<symbol id="basic-circle-12" clip-path="url(#square-q-sim2)">
<use xlink:href="#circle" transform="scale(25)"/>
</symbol>
<symbol id="basic-circle-13" clip-path="url(#square-q-sim3)">
<use xlink:href="#circle" transform="scale(25)"/>
</symbol>
<symbol id="basic-circle-14" clip-path="url(#square-q)">
<use xlink:href="#circle" x="-1" y="-1" transform="scale(25)"/>
</symbol>
<symbol id="basic-circle-15" clip-path="url(#square-q-sim1)">
<use xlink:href="#circle" x="1" y="-1" transform="scale(25)"/>
</symbol>
<symbol id="basic-circle-16" clip-path="url(#square-q-sim2)">
<use xlink:href="#circle" x="-1" y="1" transform="scale(25)"/>
</symbol>
<symbol id="basic-circle-17" clip-path="url(#square-q-sim3)">
<use xlink:href="#circle" x="1" y="1" transform="scale(25)"/>
</symbol>
<symbol id="basic-circle-18" clip-path="url(#square-h)">
<use xlink:href="#circle" transform="scale(50)"/>
</symbol>
<symbol id="basic-circle-19" clip-path="url(#square-h)">
<use xlink:href="#circle" x="-1" y="-1" transform="scale(50)"/>
</symbol>
<symbol id="basic-circle-20" clip-path="url(#square-h)">
<use xlink:href="#circle" y="-1" transform="scale(50)"/>
</symbol>
<symbol id="basic-circle-21" clip-path="url(#square-h)">
<use xlink:href="#circle" x="-1" transform="scale(50)"/>
</symbol>
<symbol id="basic-circle-22">
<use xlink:href="#circle" x="0.3333" y="0.3333" transform="scale(18.75)"/>
</symbol>
<symbol id="basic-circle-23">
<use xlink:href="#circle" x="1" y="1" transform="scale(12.5)"/>
</symbol>
<symbol id="basic-circle-24">
<use xlink:href="#circle" x="3" y="3" transform="scale(6.25)"/>
</symbol>
<symbol id="basic-circle-25">
<use xlink:href="#circle" transform="scale(12.5)"/>
</symbol>
<symbol id="basic-circle-26">
<use xlink:href="#circle" x="2" transform="scale(12.5)"/>
</symbol>
<symbol id="basic-circle-27">
<use xlink:href="#circle" x="2" y="2" transform="scale(12.5)"/>
</symbol>
<symbol id="basic-circle-28">
<use xlink:href="#circle" y="2" transform="scale(12.5)"/>
</symbol>
<symbol id="basic-circle-29">
<use xlink:href="#basic-square-1" fill="url(#pattern-circle-1)"/>
</symbol>
<symbol id="basic-circle-30">
<use xlink:href="#basic-square-1" fill="url(#pattern-circle-2)"/>
</symbol>
<symbol id="basic-circle-31" mask="url(#circle-concentric-1)">
<use xlink:href="#square" transform="scale(28.2475)"/>
</symbol>
<symbol id="basic-circle-32" mask="url(#circle-concentric-2)">
<use xlink:href="#square" transform="scale(28.2475)"/>
</symbol>
<symbol id="basic-circle-33" mask="url(#circle-concentric-3)">
<use xlink:href="#square" transform="scale(28.2475)"/>
</symbol>
<symbol id="basic-circle-34" mask="url(#circle-concentric-4)">
<use xlink:href="#square" transform="scale(28.2475)"/>
</symbol>
<symbol id="basic-circle-35" mask="url(#circle-concentric-5)">
<use xlink:href="#square" transform="scale(28.2475)"/>
</symbol>
<symbol id="basic-circle-36" mask="url(#circle-concentric-6)">
<use xlink:href="#square" transform="scale(28.2475)"/>
</symbol>
<symbol id="basic-circle-37" mask="url(#circle-concentric-7)">
<use xlink:href="#square" transform="scale(28.2475)"/>
</symbol>
<symbol id="basic-circle-38" mask="url(#circle-concentric-8)">
<use xlink:href="#square" transform="scale(28.2475)"/>
</symbol>
<symbol id="basic-circle-39" mask="url(#circle-concentric-9)">
<use xlink:href="#square" transform="scale(28.2475)"/>
</symbol>
<symbol id="basic-circle-40">
<use xlink:href="#circle" x="1" y="1" transform="scale(6.25)"/>
<use xlink:href="#circle" x="5" y="1" transform="scale(6.25)"/>
<use xlink:href="#circle" x="1" y="5" transform="scale(6.25)"/>
<use xlink:href="#circle" x="5" y="5" transform="scale(6.25)"/>
</symbol>
<!-- Circle shapes -->
<symbol id="circle-1">
<use xlink:href="#basic-circle-1"/>
</symbol>
<symbol id="circle-2">
<use xlink:href="#basic-circle-2"/>
</symbol>
<symbol id="circle-3">
<use xlink:href="#basic-circle-3"/>
</symbol>
<symbol id="circle-4">
<use xlink:href="#basic-circle-4"/>
</symbol>
<symbol id="circle-5">
<use xlink:href="#basic-circle-5"/>
</symbol>
<symbol id="circle-6">
<use xlink:href="#basic-circle-6"/>
<use xlink:href="#basic-circle-7"/>
</symbol>
<symbol id="circle-7">
<use xlink:href="#basic-circle-8"/>
<use xlink:href="#basic-circle-9"/>
</symbol>
<symbol id="circle-8">
<use xlink:href="#basic-circle-10"/>
<use xlink:href="#basic-circle-13"/>
</symbol>
<symbol id="circle-9">
<use xlink:href="#basic-circle-11"/>
<use xlink:href="#basic-circle-12"/>
</symbol>
<symbol id="circle-10">
<use xlink:href="#basic-circle-14"/>
<use xlink:href="#basic-circle-17"/>
</symbol>
<symbol id="circle-11">
<use xlink:href="#basic-circle-15"/>
<use xlink:href="#basic-circle-16"/>
</symbol>
<symbol id="circle-12">
<use xlink:href="#basic-circle-14"/>
<use xlink:href="#basic-circle-15"/>
<use xlink:href="#basic-circle-16"/>
<use xlink:href="#basic-circle-17"/>
</symbol>
<symbol id="circle-13">
<use xlink:href="#basic-circle-18"/>
</symbol>
<symbol id="circle-14">
<use xlink:href="#basic-circle-19"/>
</symbol>
<symbol id="circle-15">
<use xlink:href="#basic-circle-20"/>
</symbol>
<symbol id="circle-16">
<use xlink:href="#basic-circle-21"/>
</symbol>
<symbol id="circle-17">
<use xlink:href="#basic-circle-22"/>
</symbol>
<symbol id="circle-18">
<use xlink:href="#basic-circle-23"/>
</symbol>
<symbol id="circle-19">
<use xlink:href="#basic-circle-24"/>
</symbol>
<symbol id="circle-20">
<use xlink:href="#basic-circle-25"/>
<use xlink:href="#basic-circle-26"/>
<use xlink:href="#basic-circle-27"/>
<use xlink:href="#basic-circle-28"/>
</symbol>
<symbol id="circle-21">
<use xlink:href="#basic-circle-29"/>
</symbol>
<symbol id="circle-22">
<use xlink:href="#basic-circle-30"/>
</symbol>
<symbol id="circle-23">
<use xlink:href="#basic-circle-31"/>
</symbol>
<symbol id="circle-24">
<use xlink:href="#basic-circle-32"/>
</symbol>
<symbol id="circle-25">
<use xlink:href="#basic-circle-33"/>
</symbol>
<symbol id="circle-26">
<use xlink:href="#basic-circle-34"/>
</symbol>
<symbol id="circle-27">
<use xlink:href="#basic-circle-35"/>
</symbol>
<symbol id="circle-28">
<use xlink:href="#basic-circle-36"/>
</symbol>
<symbol id="circle-29">
<use xlink:href="#basic-circle-37"/>
</symbol>
<symbol id="circle-30">
<use xlink:href="#basic-circle-38"/>
</symbol>
<symbol id="circle-31">
<use xlink:href="#basic-circle-39"/>
</symbol>
<symbol id="circle-32">
<use xlink:href="#basic-circle-40"/>
</symbol>
<!-- Basic squares -->
<symbol id="basic-square-1">
<use xlink:href="#square" transform="scale(28.2475)"/>
</symbol>
<symbol id="basic-square-2" clip-path="url(#square-q-2v)">
<use xlink:href="#square" transform="scale(28.2475)"/>
</symbol>
<symbol id="basic-square-3" clip-path="url(#square-q-2v-sim)">
<use xlink:href="#square" transform="scale(28.2475)"/>
</symbol>
<symbol id="basic-square-4" clip-path="url(#square-q-2h)">
<use xlink:href="#square" transform="scale(28.2475)"/>
</symbol>
<symbol id="basic-square-5" clip-path="url(#square-q-2h-sim)">
<use xlink:href="#square" transform="scale(28.2475)"/>
</symbol>
<symbol id="basic-square-6" clip-path="url(#square-q)">
<use xlink:href="#square" transform="scale(28.2475)"/>
</symbol>
<symbol id="basic-square-7" clip-path="url(#square-q-sim1)">
<use xlink:href="#square" transform="scale(28.2475)"/>
</symbol>
<symbol id="basic-square-8" clip-path="url(#square-q-sim2)">
<use xlink:href="#square" transform="scale(28.2475)"/>
</symbol>
<symbol id="basic-square-9" clip-path="url(#square-q-sim3)">
<use xlink:href="#square" transform="scale(28.2475)"/>
</symbol>
<symbol id="basic-square-10">
<use xlink:href="#square" x="0.294999705" y="0.294999705" transform="scale(21.185625)"/>
</symbol>
<symbol id="basic-square-11">
<use xlink:href="#square" x="0.885" y="0.885" transform="scale(14.12375)"/>
</symbol>
<symbol id="basic-square-12">
<use xlink:href="#square" x="2.6550" y="2.6550" transform="scale(7.061875)"/>
</symbol>
<symbol id="basic-square-13" mask="url(#square-concentric-1)">
<use xlink:href="#square" transform="scale(28.2475)"/>
</symbol>
<symbol id="basic-square-14" mask="url(#square-concentric-2)">
<use xlink:href="#square" transform="scale(28.2475)"/>
</symbol>
<symbol id="basic-square-15" mask="url(#square-concentric-3)">
<use xlink:href="#square" transform="scale(28.2475)"/>
</symbol>
<symbol id="basic-square-16" mask="url(#square-concentric-4)">
<use xlink:href="#square" transform="scale(28.2475)"/>
</symbol>
<symbol id="basic-square-17" mask="url(#square-concentric-5)">
<use xlink:href="#square" transform="scale(28.2475)"/>
</symbol>
<symbol id="basic-square-18">
<use xlink:href="#basic-square-1" fill="url(#pattern-square-1)"/>
</symbol>
<symbol id="basic-square-19">
<use xlink:href="#square" transform="scale(7.061875)"/>
<use xlink:href="#square" x="3.54" transform="scale(7.061875)"/>
<use xlink:href="#square" x="1.77" y="1.77" transform="scale(7.061875)"/>
<use xlink:href="#square" x="5.31" y="1.77" transform="scale(7.061875)"/>
<use xlink:href="#square" y="3.54" transform="scale(7.061875)"/>
<use xlink:href="#square" x="3.54" y="3.54" transform="scale(7.061875)"/>
<use xlink:href="#square" x="1.77" y="5.31" transform="scale(7.061875)"/>
<use xlink:href="#square" x="5.31" y="5.31" transform="scale(7.061875)"/>
</symbol>
<symbol id="basic-square-20">
<use xlink:href="#square" x="2.655" y="0.885" transform="scale(7.061875)"/>
<use xlink:href="#square" x="0.885" y="2.655" transform="scale(7.061875)"/>
<use xlink:href="#square" x="4.425" y="2.655" transform="scale(7.061875)"/>
<use xlink:href="#square" x="2.655" y="4.425" transform="scale(7.061875)"/>
</symbol>
<symbol id="basic-square-21">
<use xlink:href="#square" x="0.885" y="0.885" transform="scale(7.061875)"/>
<use xlink:href="#square" x="4.425" y="0.885" transform="scale(7.061875)"/>
<use xlink:href="#square" x="0.885" y="4.425" transform="scale(7.061875)"/>
<use xlink:href="#square" x="4.425" y="4.425" transform="scale(7.061875)"/>
</symbol>
<symbol id="basic-square-22">
<use xlink:href="#square" transform="scale(7.061875)"/>
<use xlink:href="#square" x="5.31" transform="scale(7.061875)"/>
<use xlink:href="#square" y="5.31" transform="scale(7.061875)"/>
<use xlink:href="#square" x="5.31" y="5.31" transform="scale(7.061875)"/>
</symbol>
<symbol id="basic-square-23">
<use xlink:href="#square" x="2.65" y="2.65" transform="scale(3.5309375)"/>
<use xlink:href="#square" x="9.75" y="2.65" transform="scale(3.5309375)"/>
<use xlink:href="#square" x="2.65" y="9.75" transform="scale(3.5309375)"/>
<use xlink:href="#square" x="9.75" y="9.75" transform="scale(3.5309375)"/>
</symbol>
<symbol id="basic-square-24">
<use xlink:href="#square" x="2.65" y="2.65" transform="scale(3.5309375)"/>
<use xlink:href="#square" x="6.20" y="2.65" transform="scale(3.5309375)"/>
<use xlink:href="#square" x="9.75" y="2.65" transform="scale(3.5309375)"/>
<use xlink:href="#square" x="2.65" y="6.20" transform="scale(3.5309375)"/>
<use xlink:href="#square" x="6.20" y="6.20" transform="scale(3.5309375)"/>
<use xlink:href="#square" x="9.75" y="6.20" transform="scale(3.5309375)"/>
<use xlink:href="#square" x="2.65" y="9.75" transform="scale(3.5309375)"/>
<use xlink:href="#square" x="6.20" y="9.75" transform="scale(3.5309375)"/>
<use xlink:href="#square" x="9.75" y="9.75" transform="scale(3.5309375)"/>
</symbol>
<symbol id="basic-square-25">
<use xlink:href="#square" x="6.20" y="2.65" transform="scale(3.5309375)"/>
<use xlink:href="#square" x="2.65" y="6.20" transform="scale(3.5309375)"/>
<use xlink:href="#square" x="9.75" y="6.20" transform="scale(3.5309375)"/>
<use xlink:href="#square" x="6.20" y="9.75" transform="scale(3.5309375)"/>
</symbol>
<symbol id="basic-square-26" mask="url(#square-concentric-6)">
<use xlink:href="#square" transform="scale(28.2475)"/>
</symbol>
<symbol id="basic-square-27" mask="url(#square-concentric-7)">
<use xlink:href="#square" transform="scale(28.2475)"/>
</symbol>
<symbol id="basic-square-28">
<g transform="rotate(45 25 25)">
<use xlink:href="#square" x="2.6550" y="2.6550" transform="scale(7.061875)"/>
</g>
</symbol>
<symbol id="basic-square-29">
<g clip-path="url(#square-h)">
<g transform="rotate(45 25 25)">
<use xlink:href="#square" transform="scale(7.061875)"/>
<use xlink:href="#square" x="5.31" transform="scale(7.061875)"/>
<use xlink:href="#square" y="5.31" transform="scale(7.061875)"/>
<use xlink:href="#square" x="5.31" y="5.31" transform="scale(7.061875)"/>
</g>
</g>
</symbol>
<symbol id="basic-square-30">
<g transform="rotate(45 25 25)">
<use xlink:href="#square" x="2.65" y="2.65" transform="scale(3.5309375)"/>
<use xlink:href="#square" x="9.75" y="2.65" transform="scale(3.5309375)"/>
<use xlink:href="#square" x="2.65" y="9.75" transform="scale(3.5309375)"/>
<use xlink:href="#square" x="9.75" y="9.75" transform="scale(3.5309375)"/>
</g>
</symbol>
<symbol id="basic-square-31">
<g transform="rotate(45 25 25)">
<use xlink:href="#square" x="6.20" y="2.65" transform="scale(3.5309375)"/>
<use xlink:href="#square" x="2.65" y="6.20" transform="scale(3.5309375)"/>
<use xlink:href="#square" x="9.75" y="6.20" transform="scale(3.5309375)"/>
<use xlink:href="#square" x="6.20" y="9.75" transform="scale(3.5309375)"/>
</g>
</symbol>
<symbol id="basic-square-32">
<use xlink:href="#basic-square-1" fill="url(#pattern-square-2)"/>
</symbol>
<symbol id="basic-square-33">
<use xlink:href="#basic-square-1" fill="url(#pattern-square-3)"/>
</symbol>
<!-- Square shapes -->
<symbol id="square-1">
<use xlink:href="#basic-square-1"/>
</symbol>
<symbol id="square-2">
<use xlink:href="#basic-square-2"/>
</symbol>
<symbol id="square-3">
<use xlink:href="#basic-square-3"/>
</symbol>
<symbol id="square-4">
<use xlink:href="#basic-square-4"/>
</symbol>
<symbol id="square-5">
<use xlink:href="#basic-square-5"/>
</symbol>
<symbol id="square-6">
<use xlink:href="#basic-square-6"/>
<use xlink:href="#basic-square-9"/>
</symbol>
<symbol id="square-7">
<use xlink:href="#basic-square-7"/>
<use xlink:href="#basic-square-8"/>
</symbol>
<symbol id="square-8">
<use xlink:href="#basic-square-10"/>
</symbol>
<symbol id="square-9">
<use xlink:href="#basic-square-11"/>
</symbol>
<symbol id="square-10">
<use xlink:href="#basic-square-12"/>
</symbol>
<symbol id="square-11">
<use xlink:href="#basic-square-13"/>
</symbol>
<symbol id="square-12">
<use xlink:href="#basic-square-14"/>
</symbol>
<symbol id="square-13">
<use xlink:href="#basic-square-15"/>
</symbol>
<symbol id="square-14">
<use xlink:href="#basic-square-16"/>
</symbol>
<symbol id="square-15">
<use xlink:href="#basic-square-17"/>
</symbol>
<symbol id="square-16">
<use xlink:href="#basic-square-18"/>
</symbol>
<symbol id="square-17">
<use xlink:href="#basic-square-19"/>
</symbol>
<symbol id="square-18">
<use xlink:href="#basic-square-20"/>
</symbol>
<symbol id="square-19">
<use xlink:href="#basic-square-21"/>
</symbol>
<symbol id="square-20">
<use xlink:href="#basic-square-22"/>
</symbol>
<symbol id="square-21">
<use xlink:href="#basic-square-23"/>
</symbol>
<symbol id="square-22">
<use xlink:href="#basic-square-24"/>
</symbol>
<symbol id="square-23">
<use xlink:href="#basic-square-25"/>
</symbol>
<symbol id="square-24">
<use xlink:href="#basic-square-26" />
</symbol>
<symbol id="square-25">
<use xlink:href="#basic-square-27"/>
</symbol>
<symbol id="square-26">
<use xlink:href="#basic-square-28"/>
</symbol>
<symbol id="square-27">
<use xlink:href="#basic-square-29"/>
</symbol>
<symbol id="square-28">
<use xlink:href="#basic-square-30"/>
</symbol>
<symbol id="square-29">
<use xlink:href="#basic-square-31"/>
</symbol>
<symbol id="square-30">
<use xlink:href="#basic-square-32"/>
</symbol>
<symbol id="square-31">
<use xlink:href="#basic-square-33"/>
</symbol>
<!-- Letters -->
<g class="letter" mask="url(#mask-s)">
</g>
<g class="letter" mask="url(#mask-u)" transform="translate(110 0)">
</g>
<g class="letter" mask="url(#mask-m)" transform="translate(220 0)">
</g>
<g class="letter" mask="url(#mask-m)" transform="translate(330 0)">
</g>
<g class="letter" mask="url(#mask-a)" transform="translate(440 0)">
</g>
</svg>
var xmlns = "http://www.w3.org/2000/svg";
var xlinkns = "http://www.w3.org/1999/xlink";
//Color
var primaryColor = "#4e2468";
var secondaryColor = "#f31859";
var tertiaryColor = "#2dc3a5";
var quaternaryColor = "#d2eac9";
//Functions
function getRandomNumber(number) {
return Math.floor(Math.random() * number + 1);
}
function generateRandomShape() {
var shapeTypeNumber = getRandomNumber(2);
var shapeType;
if (shapeTypeNumber < 2) {
shapeType = "circle-";
} else {
shapeType = "square-";
}
var shapeDisplayNumber = getRandomNumber(5);
var shapeDisplay;
if (shapeDisplayNumber < 5) {
shapeDisplay = "initial";
} else {
shapeDisplay = "none";
}
var shapeNumber = getRandomNumber(32);
var contentName = "#" + shapeType + shapeNumber;
return contentName;
}
//Color
var xPrimaryColor = document.querySelectorAll(".primary-color");
var iPrimaryColor;
for (iPrimaryColor = 0; iPrimaryColor < xPrimaryColor.length; iPrimaryColor++) {
xPrimaryColor[iPrimaryColor].setAttribute("fill", primaryColor);
}
var xSecondaryColor = document.querySelectorAll(".secondary-color");
var iSecondaryColor;
for (
iSecondaryColor = 0;
iSecondaryColor < xSecondaryColor.length;
iSecondaryColor++
) {
xSecondaryColor[iSecondaryColor].setAttribute("fill", secondaryColor);
}
var xTertiaryColor = document.querySelectorAll(".tertiary-color");
var iTertiaryColor;
for (
iTertiaryColor = 0;
iTertiaryColor < xTertiaryColor.length;
iTertiaryColor++
) {
xTertiaryColor[iTertiaryColor].setAttribute("fill", tertiaryColor);
}
var xQuaternaryColor = document.querySelectorAll(".quaternary-color");
var iQuaternaryColor;
for (
iQuaternaryColor = 0;
iQuaternaryColor < xQuaternaryColor.length;
iQuaternaryColor++
) {
xQuaternaryColor[iQuaternaryColor].setAttribute("fill", QuaternaryColor);
}
//Patterns
var xPatternColor = document.querySelectorAll("pattern");
var iPatternColor;
for (iPatternColor = 0; iPatternColor < xPatternColor.length; iPatternColor++) {
var patternColorNumber = getRandomNumber(4);
var patternColor;
if (patternColorNumber > 0) {
patternColor = primaryColor;
}
if (patternColorNumber > 1) {
patternColor = secondaryColor;
}
if (patternColorNumber > 2) {
patternColor = tertiaryColor;
}
if (patternColorNumber > 3) {
patternColor = quaternaryColor;
}
xPatternColor[iPatternColor].setAttribute("fill", patternColor);
}
//Generate letter
var xLetter = document.querySelectorAll(".letter");
var iLetter;
for (iLetter = 0; iLetter < xLetter.length; iLetter++) {
var rows = 3;
var columns = 2;
var positionX = 0;
var positionY = 0;
while (positionY < rows * 50) {
var tileRow = document.createElementNS(xmlns, "g");
tileRow.classList.add("tile-row");
tileRow.setAttribute("transform", "translate(0 " + positionY + ")");
xLetter[iLetter].appendChild(tileRow);
var positionY = positionY + 50;
}
while (positionX < columns * 50) {
var xTileRow = document.querySelectorAll(".tile-row");
var iTileRow;
for (iTileRow = 0; iTileRow < xTileRow.length; iTileRow++) {
var tileColumn = document.createElementNS(xmlns, "g");
tileColumn.classList.add("tile-super-wrapper");
tileColumn.setAttribute("transform", "translate(" + positionX + " 0)");
var superWrapperBgColorNumber = getRandomNumber(3);
var superWrapperBgColor;
if (superWrapperBgColorNumber > 0) {
superWrapperBgColor = primaryColor;
}
if (superWrapperBgColorNumber > 1) {
superWrapperBgColor = secondaryColor;
}
if (superWrapperBgColorNumber > 2) {
patternColor = tertiaryColor;
}
var superWrapperBg = document.createElementNS(xmlns, "use");
superWrapperBg.setAttributeNS(xlinkns, "href", "#basic-square-1");
superWrapperBg.setAttribute("fill", superWrapperBgColor);
xTileRow[iTileRow].appendChild(tileColumn);
tileColumn.appendChild(superWrapperBg);
}
var positionX = positionX + 50;
}
}
//Wrapper and super wrapper
var xTileSuperWrapper = document.querySelectorAll(".tile-super-wrapper");
var iTileSuperWrapper;
for (
iTileSuperWrapper = 0;
iTileSuperWrapper < xTileSuperWrapper.length;
iTileSuperWrapper++
) {
var wrapperTypeNumber = getRandomNumber(3);
if (wrapperTypeNumber > 1) {
var tile0 = document.createElementNS(xmlns, "g");
tile0.classList.add("tile-wrapper");
xTileSuperWrapper[iTileSuperWrapper].appendChild(tile0);
} else {
var tile1 = document.createElementNS(xmlns, "g");
tile1.classList.add("tile-wrapper");
tile1.setAttribute("transform", "scale(0.5)");
var tile2 = document.createElementNS(xmlns, "g");
tile2.classList.add("tile-wrapper");
tile2.setAttribute("transform", "translate(25) scale(0.5)");
var tile3 = document.createElementNS(xmlns, "g");
tile3.classList.add("tile-wrapper");
tile3.setAttribute("transform", "translate(0 25) scale(0.5)");
var tile4 = document.createElementNS(xmlns, "g");
tile4.classList.add("tile-wrapper");
tile4.setAttribute("transform", "translate(25 25) scale(0.5)");
xTileSuperWrapper[iTileSuperWrapper].appendChild(tile1);
xTileSuperWrapper[iTileSuperWrapper].appendChild(tile2);
xTileSuperWrapper[iTileSuperWrapper].appendChild(tile3);
xTileSuperWrapper[iTileSuperWrapper].appendChild(tile4);
}
}
//Generate Tile
var xTile = document.querySelectorAll(".tile-wrapper");
var iTile;
for (iTile = 0; iTile < xTile.length; iTile++) {
var randomShape1 = generateRandomShape();
var randomShape2 = generateRandomShape();
var randomShape3 = generateRandomShape();
var randomTileColorNumber = getRandomNumber(3);
if (randomTileColorNumber > 0) {
randomTileColor1 = primaryColor;
randomTileColor2 = quaternaryColor;
randomTileColor3 = secondaryColor;
randomTileColor4 = tertiaryColor;
}
if (randomTileColorNumber > 1) {
randomTileColor1 = quaternaryColor;
randomTileColor2 = tertiaryColor;
randomTileColor3 = primaryColor;
randomTileColor4 = secondaryColor;
}
if (randomTileColorNumber > 2) {
randomTileColor1 = secondaryColor;
randomTileColor2 = tertiaryColor;
randomTileColor3 = quaternaryColor;
randomTileColor4 = primaryColor;
}
var tileLayer1 = document.createElementNS(xmlns, "use");
tileLayer1.setAttributeNS(xlinkns, "href", "#basic-square-1");
tileLayer1.setAttribute("fill", randomTileColor1);
var tileLayer2 = document.createElementNS(xmlns, "use");
tileLayer2.setAttributeNS(xlinkns, "href", randomShape1);
tileLayer2.setAttribute("fill", randomTileColor2);
var tileLayer3 = document.createElementNS(xmlns, "use");
tileLayer3.setAttributeNS(xlinkns, "href", randomShape2);
tileLayer3.setAttribute("fill", randomTileColor3);
var tileLayer4 = document.createElementNS(xmlns, "use");
tileLayer4.setAttributeNS(xlinkns, "href", randomShape3);
tileLayer4.setAttribute("fill", randomTileColor4);
xTile[iTile].appendChild(tileLayer1);
xTile[iTile].appendChild(tileLayer2);
xTile[iTile].appendChild(tileLayer3);
xTile[iTile].appendChild(tileLayer4);
}
//Entropy
var numOctavesNumber = getRandomNumber(20);
var xOctaves = document.querySelectorAll("feTurbulence");
var iOctaves;
for (iOctaves = 0; iOctaves < xOctaves.length; iOctaves++) {
xOctaves[iOctaves].setAttribute("numOctaves", numOctavesNumber);
}
var xContentFilter = document.querySelectorAll(".tile-wrapper");
var iContentFilter;
for (
iContentFilter = 0;
iContentFilter < xContentFilter.length;
iContentFilter++
) {
var shapeFilterNumber = getRandomNumber(4);
xContentFilter[iContentFilter].style.filter =
"url(#displacementFilter" + shapeFilterNumber + ")";
}
Also see: Tab Triggers