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.
<div class="svg-container">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="1280px" height="800px" viewBox="0 0 1280 800" enable-background="new 0 0 1280 800" xml:space="preserve">
<g id="background">
<g id="circles" display="inline">
<circle id="_x35__1_" fill="#FCFCFC" cx="640" cy="400.001" r="280.056" />
<circle id="_x34__1_" fill="#F7F7F7" cx="640" cy="400.001" r="245.049" />
<circle id="_x33__1_" fill="#F2F2F2" cx="640" cy="400.001" r="210.042" />
<circle id="_x32__1_" fill="#E5E5E5" cx="640" cy="400" r="175.035" />
<circle id="_x31__1_" fill="#DDDDDD" cx="640" cy="400" r="140.029" />
</g>
</g>
<circle id="_x31__1_copy" fill="transparent" cx="640" cy="400" r="140.029" />
</g>
<rect id="cover" x="-52.057" y="400" display="inline" fill="#DDDDDD" width="1379.113" height="467.61" />
<g id="brain">
<g id="brain-bg">
<path fill="#F2F2F2" d="M624.602,297.169c-38.32,1.114-65.818,31.155-76.47,67.726c0.476,3.021,3.03,5.416,6.21,5.416
c0.954,0,1.59,0.636,1.59,1.59c0,0.954-0.636,1.59-1.59,1.59c-3.816,0-7.323,1.927-9.391,5.268
c-1.113,6.679-1.739,13.338-1.739,20.174c0,9.859,0.804,19.538,2.235,28.921c1.59,3.657,4.919,6.062,8.895,6.062
c0.954-0.001,1.589,0.637,1.589,1.59c0,0.954-0.635,1.59-1.589,1.591c-2.703,0-5.107,1.73-6.063,4.274
c2.704,10.018,6.36,19.416,11.131,27.525l1.292,0.001c2.704,0,4.77-2.066,4.77-4.769v-6.36c0-4.452,3.498-7.95,7.951-7.951
c4.451,0.001,7.949,3.499,7.95,7.951c0,0.952-0.636,1.59-1.59,1.59c-0.955,0-1.59-0.637-1.591-1.59
c0-2.704-2.066-4.771-4.769-4.771c-2.704,0-4.77,2.066-4.77,4.771l0,6.359c0,4.135-3.18,7.474-7.155,7.949
c5.724,8.587,12.879,15.732,21.465,20.821c3.021,0.952,6.201,1.591,9.54,1.59c2.704,0.001,4.771-2.067,4.77-4.771l0-15.898
c0-0.956,0.637-1.59,1.59-1.591c0.956,0.001,1.59,0.635,1.59,1.591v15.898c0,4.135-3.18,7.484-7.155,7.802
c5.565,1.909,11.748,3.021,18.585,3.18l2.088-0.001c13.674-0.475,24.646-11.605,24.646-25.439l0-14.31
c0-4.451-3.498-7.95-7.95-7.95c-0.954-0.001-1.59-0.636-1.59-1.59c0-0.954,0.636-1.591,1.59-1.59
c4.452-0.001,7.951-3.498,7.951-7.949v-28.621c0-6.201-4.93-11.13-11.131-11.131h-9.54c-0.954,0-1.59-0.637-1.59-1.59
c0-0.955,0.636-1.59,1.59-1.59h9.54c6.201,0,11.131-4.93,11.131-11.13l0-38.161c0-4.452-3.498-7.949-7.95-7.95
c-0.954,0-1.59-0.636-1.59-1.59c0-0.953,0.636-1.589,1.59-1.59c4.452,0,7.95-3.499,7.951-7.951l0-20.669
c0-6.678-5.247-12.243-11.925-12.721h-2.089L624.602,297.169z M653.719,297.169c-6.678,0.478-11.924,6.042-11.924,12.721v20.67
c0,4.453,3.496,7.95,7.949,7.951c0.955,0,1.59,0.635,1.59,1.59c0,0.954-0.635,1.59-1.59,1.589c-4.453,0-7.949,3.499-7.949,7.95
v38.162c0,6.201,4.929,11.129,11.129,11.129h9.54c0.954,0,1.591,0.639,1.591,1.59c0,0.955-0.637,1.592-1.591,1.592h-9.54
c-6.2,0-11.129,4.928-11.129,11.129v28.622c0,4.451,3.496,7.948,7.949,7.949c0.955-0.001,1.59,0.635,1.59,1.59
s-0.635,1.59-1.59,1.59c-4.453,0-7.949,3.498-7.949,7.95v14.31c0,13.832,10.971,24.965,24.645,25.441h2.09
c6.678-0.16,12.859-1.271,18.583-3.181c-3.974-0.477-7.154-3.814-7.154-7.95v-15.9c0-0.952,0.636-1.59,1.592-1.59
c0.951,0,1.589,0.638,1.589,1.59v15.9c0,2.702,2.066,4.771,4.769,4.77c3.339,0.001,6.52-0.477,9.541-1.59
c8.744-4.93,15.741-12.074,21.467-20.818c-3.978-0.477-7.157-3.816-7.157-7.95v-6.36c0-2.703-2.066-4.77-4.771-4.77
c-2.701,0-4.77,2.066-4.77,4.77c0.001,0.955-0.636,1.589-1.59,1.589c-0.955,0.001-1.59-0.634-1.589-1.589
c-0.001-4.453,3.496-7.95,7.949-7.95c4.451,0,7.95,3.496,7.949,7.95l0.001,6.36c0,2.702,2.066,4.77,4.771,4.77l1.093-0.001
c4.93-8.108,8.587-17.51,11.131-27.528c-0.795-2.543-3.149-4.272-6.012-4.271c-0.955-0.001-1.59-0.638-1.59-1.59
c-0.001-0.955,0.635-1.592,1.59-1.591c3.975,0,7.304-2.406,8.895-6.062c1.589-9.382,2.234-19.222,2.235-28.921
c-0.001-6.836-0.627-13.544-1.739-20.223c-2.065-3.181-5.576-5.217-9.391-5.217c-0.955-0.001-1.591-0.637-1.59-1.59
c-0.001-0.954,0.635-1.59,1.591-1.59c3.179,0,5.732-2.395,6.209-5.415c-10.494-36.413-38.001-66.463-76.32-67.577h-2.091
L653.719,297.169z" />
</g>
<g id="brain-clip">
<defs>
<path id="SVGID_1_" d="M593.297,497.517c5.565,1.909,11.748,3.021,18.585,3.18l2.088-0.001
c13.674-0.475,24.646-11.605,24.646-25.439l0-14.31c0-4.451-3.498-7.95-7.95-7.95c-0.954-0.001-1.59-0.636-1.59-1.59
c0-0.954,0.636-1.591,1.59-1.59c4.452-0.001,7.951-3.498,7.951-7.949v-28.621c0-6.201-4.93-11.13-11.131-11.131h-9.54
c-0.954,0-1.59-0.637-1.59-1.59c0-0.955,0.636-1.59,1.59-1.59h9.54c6.201,0,11.131-4.93,11.131-11.13l0-38.161
c0-4.452-3.498-7.949-7.95-7.95c-0.954,0-1.59-0.636-1.59-1.59c0-0.953,0.636-1.589,1.59-1.59c4.452,0,7.95-3.499,7.951-7.951
l0-20.669c0-6.678-5.247-12.243-11.925-12.721h-2.089l0-0.005c-38.32,1.114-65.818,31.155-76.47,67.726
c0.476,3.021,3.03,5.416,6.21,5.416c0.954,0,1.59,0.636,1.59,1.59c0,0.954-0.636,1.59-1.59,1.59
c-3.816,0-7.323,1.927-9.391,5.268c-1.113,6.679-1.739,13.338-1.739,20.174c0,9.859,0.804,19.538,2.235,28.921
c1.59,3.657,4.919,6.062,8.895,6.062c0.954-0.001,1.589,0.637,1.589,1.59c0,0.954-0.635,1.59-1.589,1.591
c-2.703,0-5.107,1.73-6.063,4.274c2.704,10.018,6.36,19.416,11.131,27.525l2.087,3.181c5.724,8.587,12.879,15.732,21.465,20.821
L593.297,497.517z M720.802,468.741c4.93-8.108,8.587-17.51,11.131-27.528c-0.795-2.543-3.149-4.272-6.012-4.271
c-0.955-0.001-1.59-0.638-1.59-1.59c-0.001-0.955,0.635-1.592,1.59-1.591c3.975,0,7.304-2.406,8.895-6.062
c1.589-9.382,2.234-19.222,2.235-28.921c-0.001-6.836-0.627-13.544-1.739-20.223c-2.065-3.181-5.576-5.217-9.391-5.217
c-0.955-0.001-1.591-0.637-1.59-1.59c-0.001-0.954,0.635-1.59,1.591-1.59c3.179,0,5.732-2.395,6.209-5.415
c-10.494-36.413-38.001-66.463-76.32-67.577h-2.091l-0.001,0.003c-6.678,0.478-11.924,6.042-11.924,12.721v20.67
c0,4.453,3.496,7.95,7.949,7.951c0.955,0,1.59,0.635,1.59,1.59c0,0.954-0.635,1.59-1.59,1.589c-4.453,0-7.949,3.499-7.949,7.95
v38.162c0,6.201,4.929,11.129,11.129,11.129h9.54c0.954,0,1.591,0.639,1.591,1.59c0,0.955-0.637,1.592-1.591,1.592h-9.54
c-6.2,0-11.129,4.928-11.129,11.129v28.622c0,4.451,3.496,7.948,7.949,7.949c0.955-0.001,1.59,0.635,1.59,1.59
s-0.635,1.59-1.59,1.59c-4.453,0-7.949,3.498-7.949,7.95v14.31c0,13.832,10.971,24.965,24.645,25.441h2.09
c6.678-0.16,12.859-1.271,18.583-3.181l10.336-4.771c8.744-4.93,15.741-12.074,21.467-20.818L720.802,468.741z" />
</defs>
<clipPath id="SVGID_2_">
<use xlink:href="#SVGID_1_" overflow="visible" />
</clipPath>
<path id="water-1" clip-path="url(#SVGID_2_)" fill="#6674AD" d="M492.043,528.598V346.608c0,0,22.021-9.263,30.445,0
c8.424,9.262,30.445,0,30.445,0s21.557-9.773,30.445,0c8.888,9.772,30.445,0,30.445,0s21.766-9.541,30.445,0
c8.677,9.54,30.444,0,30.444,0s20.796-10.608,30.445,0c9.647,10.608,30.444,0,30.444,0v181.989H492.043z" />
<path id="water-2" clip-path="url(#SVGID_2_)" fill="#6D91E8" d="M525.824,528.598V346.608c0,0,22.021-9.263,30.445,0
c8.424,9.262,30.445,0,30.445,0s21.557-9.773,30.445,0c8.888,9.772,30.444,0,30.444,0s21.768-9.541,30.445,0
c8.677,9.54,30.446,0,30.446,0s20.795-10.608,30.444,0c9.648,10.608,30.444,0,30.444,0v181.989H525.824z" />
</g>
<g id="folds-group">
<path d="M621.124,306.709c4.452,0,7.95,3.499,7.95,7.95c0,0.954-0.636,1.59-1.59,1.589c-0.954,0-1.59-0.636-1.59-1.589
c0-2.704-2.067-4.771-4.77-4.771c-2.704,0-4.771,2.068-4.771,4.771c0,0.953-0.636,1.589-1.59,1.589
c-0.954,0-1.59-0.636-1.591-1.589C613.173,310.208,616.672,306.71,621.124,306.709z M659.285,306.709
c4.451,0,7.948,3.498,7.948,7.951c0.001,0.953-0.634,1.589-1.589,1.589c-0.953,0-1.59-0.636-1.589-1.589
c-0.001-2.703-2.067-4.77-4.771-4.771c-2.703,0-4.771,2.068-4.771,4.771c0,0.953-0.635,1.589-1.59,1.589
c-0.954,0-1.59-0.636-1.59-1.59C651.334,310.208,654.834,306.709,659.285,306.709z M627.484,322.61
c0.954,0,1.59,0.636,1.589,1.589c0,4.452-3.499,7.951-7.95,7.951c-4.452,0-7.951,3.498-7.95,7.95c0,4.451,3.499,7.95,7.95,7.95
c4.452,0,7.95,3.498,7.95,7.95c0,0.954-0.636,1.59-1.59,1.591c-0.955,0-1.59-0.637-1.59-1.591c0-2.703-2.067-4.771-4.77-4.77
c-6.202,0-11.131-4.929-11.131-11.13c0-6.201,4.929-11.13,11.13-11.13c2.703,0,4.77-2.066,4.771-4.771
C625.894,323.246,626.53,322.61,627.484,322.61z M652.924,322.609c0.955,0,1.59,0.636,1.59,1.59c0,2.704,2.068,4.771,4.771,4.771
c6.2,0,11.128,4.929,11.129,11.13c0,6.201-4.928,11.13-11.129,11.129c-2.703,0-4.771,2.067-4.771,4.771
c0,0.953-0.635,1.59-1.59,1.59c-0.953,0-1.59-0.637-1.59-1.59c0-4.452,3.499-7.95,7.95-7.95c4.452,0,7.949-3.499,7.949-7.95
c0-4.452-3.497-7.95-7.948-7.95c-4.451,0-7.951-3.499-7.951-7.951C651.334,323.246,651.971,322.609,652.924,322.609z
M586.144,335.33c4.453,0,7.95,3.498,7.95,7.95c0,0.955-0.636,1.59-1.59,1.59c-0.954,0-1.59-0.636-1.59-1.59
c0-2.702-2.067-4.77-4.77-4.77c-2.703,0-4.77,2.067-4.77,4.77c0,0.954-0.636,1.59-1.591,1.59c-0.954,0-1.59-0.635-1.59-1.59
C578.194,338.828,581.692,335.33,586.144,335.33z M694.265,335.33c4.452,0,7.95,3.498,7.95,7.951c0,0.954-0.637,1.589-1.59,1.589
c-0.955,0-1.591-0.635-1.591-1.589c0-2.703-2.066-4.771-4.769-4.771c-2.704,0-4.771,2.068-4.771,4.771
c0.001,0.954-0.635,1.589-1.59,1.589c-0.954,0-1.59-0.635-1.59-1.59C686.314,338.828,689.813,335.33,694.265,335.33z
M560.703,363.95c4.452,0,7.95,3.499,7.95,7.95c0,4.453-3.498,7.951-7.95,7.951c-0.954,0-1.59-0.637-1.589-1.59
c0-0.955,0.635-1.59,1.59-1.59c2.703,0,4.77-2.067,4.77-4.771c0-2.703-2.067-4.77-4.771-4.77c-0.954,0-1.59-0.636-1.589-1.59
C559.114,364.586,559.749,363.95,560.703,363.95z M621.125,363.95c4.452,0,7.95,3.499,7.949,7.95c0,0.955-0.636,1.591-1.589,1.59
c-0.954,0-1.59-0.636-1.59-1.59c0-2.703-2.067-4.77-4.771-4.77c-0.954,0-1.59-0.636-1.59-1.59
C619.534,364.586,620.169,363.95,621.125,363.95z M659.285,363.95c0.953,0,1.589,0.636,1.589,1.591
c0,0.954-0.636,1.589-1.589,1.589c-2.703,0-4.771,2.067-4.771,4.77c0,0.954-0.635,1.59-1.59,1.59c-0.954,0-1.59-0.637-1.59-1.59
C651.334,367.448,654.833,363.95,659.285,363.95z M719.705,363.95c0.955,0,1.591,0.636,1.591,1.59
c0,0.954-0.637,1.589-1.591,1.589c-2.703,0-4.77,2.067-4.77,4.77c0,2.704,2.066,4.771,4.77,4.771c0.954,0,1.592,0.635,1.592,1.59
c-0.001,0.954-0.638,1.59-1.592,1.59c-4.452-0.001-7.95-3.499-7.949-7.951C711.755,367.448,715.253,363.95,719.705,363.95z
M579.783,370.311c0.954,0,1.59,0.636,1.59,1.589c0,11.449-9.222,20.67-20.67,20.67c-0.954,0-1.59-0.637-1.589-1.59
c0-0.954,0.635-1.59,1.59-1.59c9.699,0,17.49-7.791,17.49-17.49C578.194,370.946,578.83,370.31,579.783,370.311z M700.625,370.311
c0.953,0,1.59,0.635,1.59,1.589c0,9.699,7.791,17.491,17.49,17.491c0.954,0,1.591,0.636,1.592,1.59
c-0.001,0.953-0.638,1.59-1.592,1.59c-11.449,0-20.671-9.223-20.671-20.67C699.034,370.946,699.67,370.311,700.625,370.311z
M627.484,379.851c0.955,0,1.59,0.635,1.59,1.589c0,4.452-3.499,7.95-7.95,7.95h-12.721c-6.201,0-11.13,4.929-11.13,11.13
c0,6.2,4.929,11.131,11.13,11.131c0.955,0,1.59,0.636,1.59,1.59c0,0.955-0.636,1.59-1.59,1.59c-7.949,0-14.31-6.359-14.31-14.311
c0-7.95,6.36-14.311,14.31-14.31l12.721,0c2.703,0,4.771-2.067,4.77-4.77C625.895,380.486,626.53,379.851,627.484,379.851z
M652.924,379.851c0.955,0,1.59,0.636,1.59,1.589c0,2.703,2.068,4.77,4.77,4.77h12.722c7.951,0,14.31,6.36,14.31,14.31
c0,7.952-6.359,14.312-14.309,14.312c-0.955,0-1.592-0.635-1.593-1.59c0-0.954,0.638-1.59,1.592-1.591
c6.202,0.001,11.13-4.929,11.13-11.13c0-6.2-4.928-11.13-11.13-11.13l-12.72,0c-4.451,0-7.951-3.498-7.951-7.95
C651.334,380.486,651.971,379.851,652.924,379.851z M563.883,408.472c4.453,0,7.95,3.497,7.95,7.949
c0,0.954-0.635,1.591-1.59,1.591c-0.954-0.001-1.59-0.637-1.59-1.591c0-2.703-2.066-4.77-4.77-4.77
c-0.954,0-1.59-0.637-1.59-1.591C562.293,409.107,562.929,408.472,563.883,408.472z M716.525,408.471
c0.954,0.001,1.59,0.637,1.59,1.59c0.001,0.955-0.635,1.591-1.59,1.591c-2.704,0-4.77,2.066-4.77,4.769
c0,0.955-0.637,1.592-1.591,1.592c-0.953-0.001-1.59-0.637-1.59-1.591C708.575,411.969,712.072,408.472,716.525,408.471z
M621.124,411.651c4.452,0,7.95,3.496,7.95,7.95c0,4.451-3.499,7.95-7.95,7.95h-4.77c-0.954,0-1.59-0.638-1.59-1.591
c0-0.954,0.636-1.59,1.59-1.59h4.77c2.703,0,4.77-2.067,4.77-4.77c0-2.704-2.067-4.771-4.77-4.771c-0.955,0-1.59-0.635-1.59-1.59
C619.534,412.287,620.169,411.651,621.124,411.651z M659.285,411.651c0.953,0,1.589,0.636,1.589,1.59
c0.001,0.955-0.636,1.59-1.589,1.59c-2.703,0-4.771,2.066-4.771,4.771c0,2.703,2.068,4.77,4.771,4.77h4.77
c0.953,0,1.59,0.635,1.59,1.591c0,0.953-0.637,1.59-1.59,1.59h-4.77c-4.451,0-7.951-3.499-7.951-7.95
C651.334,415.147,654.834,411.651,659.285,411.651z M560.703,414.831c0.955,0,1.59,0.637,1.59,1.59c0,0.954-0.635,1.59-1.59,1.59
c-2.703,0.001-4.77,2.066-4.77,4.771c0,2.702,2.066,4.771,4.77,4.771c4.452,0,7.95,3.497,7.95,7.949
c0,4.451-3.497,7.951-7.95,7.951c-0.954-0.001-1.59-0.638-1.59-1.59c0-0.955,0.636-1.59,1.59-1.591
c2.703,0.001,4.771-2.067,4.771-4.771c0-2.702-2.067-4.77-4.771-4.77c-4.452,0-7.95-3.496-7.95-7.95
C552.753,418.329,556.251,414.831,560.703,414.831z M719.705,414.831c4.452,0,7.95,3.498,7.949,7.95
c0,4.453-3.498,7.949-7.949,7.949c-2.702,0-4.77,2.067-4.769,4.771c-0.001,2.704,2.065,4.771,4.769,4.771
c0.954,0.001,1.591,0.635,1.591,1.591c0,0.951-0.637,1.59-1.591,1.59c-4.451,0-7.95-3.499-7.95-7.952
c0.001-4.451,3.499-7.948,7.95-7.948c2.702,0,4.77-2.067,4.77-4.771c0-2.702-2.067-4.77-4.77-4.77c-0.954,0-1.59-0.636-1.59-1.591
C718.115,415.468,718.751,414.831,719.705,414.831z M603.634,424.371h4.769c0.954,0,1.59,0.636,1.59,1.591
c0,0.953-0.636,1.59-1.59,1.589h-4.77c-2.703,0.001-4.771,2.068-4.771,4.769c0,2.704,2.068,4.771,4.771,4.771
c0.954-0.001,1.59,0.638,1.59,1.59c0,0.954-0.636,1.592-1.59,1.591c-4.452,0-7.95-3.498-7.95-7.951
C595.684,427.869,599.182,424.371,603.634,424.371z M672.006,424.371h4.769c4.452,0,7.951,3.497,7.951,7.948
c0,4.454-3.499,7.952-7.951,7.953c-0.952,0-1.59-0.638-1.59-1.592c0.001-0.952,0.637-1.59,1.59-1.591
c2.703,0,4.771-2.066,4.771-4.771c0-2.701-2.067-4.769-4.771-4.768h-4.769c-0.955,0-1.593-0.637-1.593-1.59
C670.413,425.006,671.051,424.371,672.006,424.371z M627.484,440.272c0.954,0,1.589,0.634,1.59,1.59c0,0.951-0.636,1.59-1.59,1.59
c-4.453,0-7.95,3.497-7.95,7.949v15.899c0,4.452-3.498,7.95-7.95,7.95s-7.95-3.498-7.95-7.949c0-2.704-2.067-4.77-4.771-4.77
c-0.954-0.001-1.589-0.637-1.589-1.591c0-0.954,0.636-1.591,1.589-1.59c4.453,0,7.95,3.499,7.95,7.95
c0,2.702,2.067,4.769,4.77,4.769c2.704,0.001,4.77-2.065,4.771-4.769v-15.9C616.354,445.2,621.283,440.272,627.484,440.272z
M652.924,440.271c6.201,0.001,11.131,4.929,11.131,11.13v15.9c0,2.702,2.067,4.769,4.769,4.769c2.704,0,4.771-2.065,4.772-4.769
c0-4.451,3.497-7.951,7.949-7.95c0.955,0,1.59,0.635,1.59,1.59c0,0.954-0.635,1.591-1.59,1.591c-2.704,0-4.771,2.066-4.771,4.77
c0,4.452-3.498,7.949-7.95,7.949c-4.451,0-7.949-3.497-7.95-7.949v-15.9c0-4.453-3.497-7.949-7.95-7.949
c-0.953,0-1.59-0.638-1.59-1.59C651.334,440.907,651.97,440.271,652.924,440.271z M718.915,471.923
c-3.978-0.477-7.157-3.816-7.157-7.95v-6.36c0-2.703-2.066-4.77-4.771-4.77c-2.701,0-4.77,2.066-4.77,4.77
c0.001,0.955-0.636,1.589-1.59,1.589c-0.955,0.001-1.59-0.634-1.589-1.589c-0.001-4.453,3.496-7.95,7.949-7.95
c4.451,0,7.95,3.496,7.949,7.95l0.001,6.36c0,2.702,2.066,4.77,4.771,4.77l1.093-0.001 M687.112,497.512
c-3.974-0.477-7.154-3.814-7.154-7.95v-15.9c0-0.952,0.636-1.59,1.592-1.59c0.951,0,1.589,0.638,1.589,1.59v15.9
c0,2.702,2.066,4.771,4.769,4.77c3.339,0.001,6.52-0.477,9.541-1.59 M559.41,468.895l1.292,0.001c2.704,0,4.77-2.066,4.77-4.769
v-6.36c0-4.452,3.498-7.95,7.951-7.951c4.451,0.001,7.949,3.499,7.95,7.951c0,0.952-0.636,1.59-1.59,1.59
c-0.955,0-1.59-0.637-1.591-1.59c0-2.704-2.066-4.771-4.769-4.771c-2.704,0-4.77,2.066-4.77,4.771l0,6.359
c0,4.135-3.18,7.474-7.155,7.949L559.41,468.895z M582.962,492.896c3.021,0.952,6.201,1.591,9.54,1.59
c2.704,0.001,4.771-2.067,4.77-4.771l0-15.898c0-0.956,0.637-1.59,1.59-1.591c0.956,0.001,1.59,0.635,1.59,1.591v15.898
c0,4.135-3.18,7.484-7.155,7.802" />
</g>
</g>
<g id="head">
<path id="headBottom" d="M733.031,577.776l-0.087-0.346c-7.743-29.068-8.493-75.384,7.474-101.197
c24.247-33.311,36.854-67.876,30.277-107.631c-1.187-9.785-3.367-15.033-3.367-15.033c-1.205-4.694-2.745-9.284-4.59-13.745
c-0.449-1.082-0.92-2.153-1.405-3.219l-242.101,3.586c-7.535,16.931-10.042,33.047-6.686,44.051
c2.986,9.793,3.319,11.703-4.439,24.46c-6.789,11.149-16.569,28.415-21.158,36.841c-0.876,1.626-1.253,3.484-1.253,5.451
c0,6.019,4.611,10.953,10.49,11.466l1.755,0.004l18.833,0.09c-0.04,13.274-0.176,45.056-0.301,62.697l-0.001,1.231
c0,10.769,8.556,19.536,19.248,19.862l36.822,0.044c16.361,0.001,23.402,5.591,25.997,18.755l2.771,12.633
c0,0,14.19,59.724-47.31,108.474c0,0,76.5,79.25,149.5,32.25C773.469,673.451,741.562,611.053,733.031,577.776z" />
<g id="headTop">
<path d="M662.609,266.565l-41.499-0.183c-44.154,6.061-81.035,31.741-98.373,66.569
c-1.269,2.422-2.438,4.839-3.506,7.24l242.101-3.586C744.851,300.347,707.627,273.182,662.609,266.565z" />
<path id="headphones" d="M621.111,265.382l0,61.998c0,9.029,4.417,15.108,10.378,18.245v15.302
c-24.844,4.84-43.599,26.721-43.599,52.983c0,29.812,24.163,53.978,53.98,53.977c29.812,0.001,53.979-24.165,53.977-53.976
c0.002-26.271-18.76-48.153-43.615-52.987l-0.001-15.299c5.962-3.136,10.38-9.215,10.379-18.245l-0.001-61.814L621.111,265.382z
M672.067,413.911c0,16.674-13.518,30.19-30.191,30.19c-16.675-0.001-30.192-13.517-30.192-30.191
c0-16.674,13.518-30.191,30.191-30.191C658.55,383.719,672.066,397.235,672.067,413.911z" />
<g id="bandaid">
<path fill="#FFFFFF" d="M738.284,345.329c0,0-4.369-4.37-10.328-10.33c5.959-5.958,10.328-10.328,10.328-10.328
c3.33-3.331,3.33-8.75,0-12.08l-10.523-10.523c-3.332-3.331-8.751-3.331-12.082,0l-10.326,10.327
c-5.961-5.958-10.329-10.327-10.329-10.327c-3.33-3.331-8.749-3.331-12.081,0l-10.523,10.524c-3.328,3.329-3.328,8.749,0,12.079
c0,0,4.37,4.369,10.328,10.328l-10.328,10.327c-3.331,3.331-3.331,8.75,0,12.083l10.524,10.524c3.331,3.328,8.75,3.328,12.081,0
c0,0,4.368-4.373,10.328-10.33c5.959,5.959,10.327,10.33,10.327,10.33c3.331,3.328,8.751,3.328,12.081,0
c0.002,0,10.525-10.524,10.525-10.524c1.612-1.616,2.503-3.759,2.503-6.041C740.787,349.087,739.896,346.942,738.284,345.329z
M718.41,304.798c0.883-0.887,2.06-1.373,3.311-1.373c1.252,0,2.429,0.487,3.313,1.373l10.523,10.522
c1.825,1.826,1.825,4.797,0,6.624c0,0-4.371,4.371-10.328,10.329c-0.798-0.797-1.643-1.644-2.472-2.472
c0.691,0.025,1.389-0.217,1.916-0.744c1.005-1.005,1.005-2.634,0.002-3.637c-1.006-1.005-2.635-1.005-3.639,0
c-0.527,0.526-0.771,1.226-0.744,1.917c-2.324-2.326-4.69-4.692-7.021-7.019c0.692,0.025,1.391-0.217,1.919-0.746
c1.006-1.004,1.006-2.633,0-3.635c-1.005-1.006-2.631-1.006-3.636,0c-0.526,0.527-0.77,1.228-0.744,1.92
c-0.918-0.919-1.851-1.851-2.734-2.733C714.038,309.166,718.41,304.798,718.41,304.798z M692.297,365.205
c-1.826,1.827-4.798,1.827-6.627,0l-10.524-10.523c-1.824-1.825-1.823-4.798,0.003-6.624c0,0,4.37-4.37,10.328-10.328
c0.746,0.744,1.535,1.534,2.308,2.306c-0.331,0.126-0.644,0.315-0.908,0.581c-1.006,1.007-1.006,2.635-0.003,3.64
c1.008,1.003,2.634,1.003,3.64,0c0.267-0.269,0.456-0.579,0.581-0.91c2.052,2.052,4.122,4.122,6.172,6.172
c-0.332,0.125-0.644,0.315-0.909,0.582c-1.005,1.004-1.005,2.633,0,3.636c1.005,1.005,2.633,1.005,3.639,0
c0.266-0.266,0.456-0.578,0.582-0.91c0.682,0.685,1.387,1.388,2.046,2.05C696.665,360.835,692.297,365.205,692.297,365.205z
M735.558,354.681l-10.523,10.523c-1.827,1.827-4.8,1.827-6.628,0c0,0-4.368-4.37-10.33-10.328
c-0.875-0.878-1.786-1.79-2.726-2.728c-5.429-5.43-11.717-11.717-17.145-17.149c-0.941-0.937-1.853-1.849-2.729-2.727
c-5.959-5.958-10.328-10.327-10.328-10.327c-1.826-1.828-1.826-4.798-0.003-6.625l10.525-10.522
c0.884-0.886,2.062-1.373,3.312-1.373c1.252,0,2.43,0.488,3.313,1.373l10.329,10.328l2.728,2.726L722.5,335l2.729,2.729
l10.329,10.329c0.885,0.883,1.372,2.062,1.372,3.311C736.931,352.621,736.441,353.797,735.558,354.681z" />
<path fill="#FFFFFF" d="M708.151,325.201c-1.546-1.546-4.053-1.546-5.601,0l-6.997,7c-1.547,1.545-1.549,4.052,0,5.6l6.997,7.001
c1.548,1.546,4.054,1.546,5.601,0l7.001-7.001c1.544-1.545,1.544-4.053,0-5.6L708.151,325.201z" />
<circle fill="#FFFFFF" cx="722.271" cy="318.342" r="2.573" />
<circle fill="#FFFFFF" cx="721.687" cy="309.444" r="2.572" />
<circle fill="#FFFFFF" cx="731.168" cy="318.926" r="2.572" />
<circle fill="#FFFFFF" cx="689.278" cy="351.334" r="2.573" />
<circle fill="#FFFFFF" cx="680.38" cy="350.75" r="2.571" />
<path fill="#FFFFFF" d="M688.046,358.414c-1.008,1.003-1.008,2.631,0,3.636c1.002,1.004,2.631,1.005,3.634,0
c1.009-1.005,1.009-2.633,0-3.636C690.677,357.41,689.047,357.41,688.046,358.414z" />
<circle fill="#FFFFFF" cx="721.167" cy="350.88" r="2.573" />
<path fill="#FFFFFF" d="M722.4,343.801c1.004-1.005,1.004-2.633,0.001-3.638c-1.006-1.004-2.632-1.004-3.638,0
c-1.003,1.004-1.006,2.632,0,3.638C719.77,344.805,721.396,344.805,722.4,343.801z" />
<circle fill="#FFFFFF" cx="730.065" cy="351.464" r="2.571" />
<circle fill="#FFFFFF" cx="712.271" cy="350.295" r="2.572" />
<circle fill="#FFFFFF" cx="721.751" cy="359.777" r="2.573" />
<circle fill="#FFFFFF" cx="689.667" cy="319.381" r="2.572" />
<circle fill="#FFFFFF" cx="689.084" cy="310.483" r="2.571" />
<circle fill="#FFFFFF" cx="698.564" cy="319.965" r="2.572" />
<circle fill="#FFFFFF" cx="680.771" cy="318.796" r="2.572" />
<circle fill="#FFFFFF" cx="690.253" cy="328.278" r="2.571" />
</g>
</g>
</g>
</svg>
</div>
<div class="bottom">
<button id="replay">Ver de nuevo</button>
<div id="jam"><span>o escucha este artículo</span></div>
</div>
</div>
<audio id="alarm">
<source src="https://cibersergei.com/wp-content/uploads/2021/09/Como-la-Neurociencia-nos-puede-ayudar-a-evitar-estafas-virtuales.mp3" type="audio/mpeg">
</audio>
<p class="collection">
<a href="https://cibersergei.com/hacks-productividad/" target="_blank">CiberSergei Hacks <br> de Productividad</a>
</p>
html, body, svg-container {
width: 100%;
height: 100%;
overflow: hidden;
}
svg {
width: 100%;
height: auto;
}
body {
background-image: url(http://subtlepatterns2015.subtlepatterns.netdna-cdn.com/patterns/new_year_background.png)
}
svg {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 100%;
height: auto;
#head {
fill: #9C9C9C;
#headphones, #bandaid {
fill: #fff;
opacity: 0;
}
}
#circles {
/* circle { fill: #DDDDDD;}
#_x35__1_{
opacity: 0.3;
}
#_x34__1_{
opacity: 0.3;
}
#_x33__1_{
opacity: 0.3;
}
#_x32__1_{
opacity: 0.3;
} */
#_x31__1_{
/* display: block !important; */
}
}
}
.bottom {
position: absolute;
bottom: 50px;
left: 50%;
transform: translateX(-50%);
opacity: 0;
#jam {
/* display: none; */
&:hover {
cursor: pointer;
color: #FF0000;
}
}
}
button {
text-transform: uppercase;
font-family: helvetica;
letter-spacing: 0.2rem;
background-color: white;
color: black;
&:hover, &:focus {
background-color: black;
color: white;
outline: none;
}
}
.collection {
position: fixed;
z-index: 1000;
width: auto;
bottom: 0;
justify-content: right;
right: 0;
margin: 15px;
padding: 0;
font-family: 'Montserrat', sans-serif;
font-size: 16px;
}
.collection a {
display: inline-block;
background: #fff;
opacity: 0.4;
transition: opacity 0.7s;
margin-left: 5px;
padding: 5px;
text-decoration: none;
font-weight: bold;
color: #000;
}
.collection a:hover {
opacity: 1;
}
.collection2 {
position: fixed;
z-index: 1000;
width: auto;
bottom: 0;
justify-content: left;
left: 0;
margin: 15px;
padding: 0;
font-family: 'Montserrat', sans-serif;
font-size: 14px;
}
var svg = {
head: {
container: $('svg').find('#head'),
top: $('svg').find('#headTop'),
bottom: $('svg').find('#headBottom'),
phones: $('svg').find('#headphones'),
bandaid: $('svg').find('#bandaid')
},
brain: {
container: $('svg').find('#brain'),
bg: $('svg').find('#brain-bg'),
folds: $('svg').find('#folds-group'),
water: $('svg').find('#water-1, #water-2'),
waterFront: $('svg').find('#water-1'),
waterBack: $('svg').find('#water-2')
},
bg: {
circles: $('svg').find('#circles circle'),
cover: $('svg').find('#cover'),
},
fact: $('svg').find('#fact')
}
svg.head.all = [
svg.head.top,
svg.head.bottom
],
svg.brain.all = [
svg.brain.bg,
svg.brain.folds,
svg.brain.waterBack,
svg.brain.waterFront,
],
svg.bg.all = [
svg.bg.circles,
svg.bg.cover,
]
tl = new TimelineMax({
delay: 1,
// repeat: -1,
// yoyo: true
// paused: true
defaultEase: Quad.easeIn
});
tl
// Setup
.set([svg.brain.water, svg.head.phones], {
opacity: 0
})
.set(svg.brain.water, {
yPercent: '0%'
})
.set(svg.head.container, {
opacity: 1,
y: '180'
})
.set(svg.head.top, {
transformOrigin: 'right 71px',
y: '1'
})
.set(svg.fact, {
transformOrigin: 'center center',
})
// Start it up
.add('start')
// Scalp him and lose the head
.add('headsplit', '+=0.5')
.set([svg.brain.bg, svg.brain.folds], {
opacity: 1
})
.to(svg.head.top, 0.5, {
rotation: '150deg',
ease: Power3.easeOut
}, 'headsplit')
.from(svg.brain.container, 0.3, {
y: '180'
}, 'headsplit+=0.3')
//Fill 'er up
.add('brainfill')
.set(svg.brain.water, {
opacity: 1
}, 'headsplit')
.from('#SVGID_2_', 1.5, {
y: '-300px',
// ease: Power0.easeNone
}, 'brainfill+=0.5')
.from(svg.brain.water, 1.5, {
y: '300px',
// ease: Power0.easeNone
}, 'brainfill+=0.5')
// Make the Halo appear
.staggerFromTo(svg.bg.circles, 2, {
display: 'none'
}, {
display: 'block'
}, -0.2, 'brainfill-=0.2')
// Rotate the fact in
.add('factIn', 'brainfill')
.fromTo(svg.fact, 4, {
rotation: '180deg',
}, {
rotation: '-180deg',
ease: SlowMo.ease.config(0.1, 0.9, false)
}, 'factIn')
// Flip the Fact letters
// .set('#fact path', {
// transformOrigin: 'center center',
// perspective: 400
// }, 'factIn')
// .staggerTo('#fact path', 0.5, {
// rotationY: -360
// }, 0.1, 'factIn+=1')
// Close the head up nice
.add('headClose', '-=0.3')
.to(svg.head.top, 0.2, {
rotation: '0deg'
}, 'headClose')
.to(svg.head.container, 0.2, {
y: '20'
}, 'headClose')
// Patch him up
.fromTo(svg.head.bandaid, 0.2, {
y: '-50'
}, {
opacity: 1,
y: '0'
}, '+=0.3')
.fromTo('.bottom', 0.4, {
y: '30'
}, {
y: 0,
opacity: 1,
});
// Strobe the circles
var strobeTl = new TimelineMax({
paused: true,
repeat: -1,
yoyo: true
});
strobeTl
.staggerTo(svg.bg.circles, 0.4, {
fill: '#FF0000'
}, -0.1)
.staggerTo(svg.bg.circles, 0.4, {
clearProps: 'fill'
}, -0.1, '-=0.3');
// Replay
$('#replay').on('click', function() {
strobeTl.progress(0).pause();
tl.progress(0).play();
});
// Jam
$('#jam').on('click', function() {
strobeTl.timeScale = 4;
TweenMax.to(svg.head.bandaid, 0.2, {
opacity: 0,
y: '30'
})
TweenMax.fromTo(svg.head.phones, 0.2, {
y: '-50',
opacity: 0
}, {
opacity: 1,
y: '0'
})
strobeTl.progress(0).play();
var alarm = document.getElementById("alarm");
alarm.load();
alarm.play();
});
Also see: Tab Triggers