HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
Any URLs added here will be added as <link>
s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
Any URL's added here will be added as <script>
s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
Search for and use JavaScript packages from npm here. By selecting a package, an import
statement will be added to the top of the JavaScript editor for this package.
Using packages here is powered by esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<div class="container">
<div class="row" id="live">
<div class="col-md-6">
<h1>I continue to learn when it's live</h1>
<p class="lead">Data is a user experience designer’s best friend.</p><p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
<div class="col-md-6"></div>
</div>
<div class="row text-center" id="brands">
<h2>Brands I've worked with</h2>
<p class="lead">I have had the pleasure of working with some of the world's most well-known brands</p>
<div class="col-md-4">
<h4>American Express</h4>
<h4>Lexus</h4>
<h4>Toyota</h4>
</div>
<div class="col-md-4">
<h4>GOV.UK</h4>
<h4>MANCHESTER UNITED</h4>
<h4>VAUXHALL</h4>
</div>
<div class="col-md-4">
<h4>John Lewis</h4>
<h4>TESCO</h4>
<h4>Volkswagen</h4>
</div>
<svg id="Group_1" data-name="Group 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1275 875" width="100%" height="875px" preserveAspectRatio="xMinYMin slice">
<defs>
<linearGradient id="grad" x1="0%" x2="0%" y1="100%" y2="0%">
<stop offset="0%" stop-color="rgb(92,61,95)" stop-opacity="1" />
<stop offset="100%" stop-color="rgb(20,22,63)" stop-opacity="1" />
</linearGradient>
<style>
.cls-1{fill:#fff;}
.cls-1,.cls-2{fill-rule:evenodd;}
.cls-2{fill:#1d00d8;}
.cls-3{fill:#2a94d6;}
.cls-4{fill:#fff;}
</style>
</defs>
<title>graph</title>
<g id="graph-white">
<polygon class="cls-1" points="1200 32 1125 89 1050 81 975 113 900 97 825 128 750 163 675 152 600 172 525 163 450 215 375 205 300 221 225 195 150 223 75 230 0 238 0 255 1275 255 1275 0 1200 32"/>
</g>
<g id="graph-white-2" data-name="graph-white">
<polygon fill="url(#grad)" points="1200 34.17 1125 91.17 1050 83.17 975 115.17 900 99.17 825 130.17 750 165.17 675 154.17 600 174.17 525 165.17 450 217.17 375 207.17 300 223.17 225 197.17 150 225.17 75 232.17 0 240.17 0 875 1275 875 1275 2.17 1200 34.17"/>
</g>
<g id="points">
<g id="Ellipse_1" data-name="Ellipse 1">
<circle class="cls-3" cx="525" cy="163" r="4.5"/>
<path class="cls-4" d="M525,285a3,3,0,1,1-3,3,3,3,0,0,1,3-3m0-3a6,6,0,1,0,6,6,6,6,0,0,0-6-6Z" transform="translate(0 -125)"/>
</g>
<g id="Ellipse_1-2" data-name="Ellipse 1">
<circle class="cls-3" cx="600" cy="172" r="4.5"/>
<path class="cls-4" d="M600,294a3,3,0,1,1-3,3,3,3,0,0,1,3-3m0-3a6,6,0,1,0,6,6,6,6,0,0,0-6-6Z" transform="translate(0 -125)"/>
</g>
<g id="Ellipse_1-3" data-name="Ellipse 1">
<circle class="cls-3" cx="675" cy="153" r="4.5"/>
<path class="cls-4" d="M675,275a3,3,0,1,1-3,3,3,3,0,0,1,3-3m0-3a6,6,0,1,0,6,6,6,6,0,0,0-6-6Z" transform="translate(0 -125)"/>
</g>
<g id="Ellipse_1-4" data-name="Ellipse 1">
<circle class="cls-3" cx="750" cy="165" r="4.5"/>
<path class="cls-4" d="M750,287a3,3,0,1,1-3,3,3,3,0,0,1,3-3m0-3a6,6,0,1,0,6,6,6,6,0,0,0-6-6Z" transform="translate(0 -125)"/>
</g>
<g id="Ellipse_1-5" data-name="Ellipse 1">
<circle class="cls-3" cx="825" cy="129" r="4.5"/>
<path class="cls-4" d="M825,251a3,3,0,1,1-3,3,3,3,0,0,1,3-3m0-3a6,6,0,1,0,6,6,6,6,0,0,0-6-6Z" transform="translate(0 -125)"/>
</g>
<g id="Ellipse_1-6" data-name="Ellipse 1">
<circle class="cls-3" cx="900" cy="99" r="4.5"/>
<path class="cls-4" d="M900,221a3,3,0,1,1-3,3,3,3,0,0,1,3-3m0-3a6,6,0,1,0,6,6,6,6,0,0,0-6-6Z" transform="translate(0 -125)"/>
</g>
<g id="Ellipse_1-7" data-name="Ellipse 1">
<circle class="cls-3" cx="975" cy="114" r="4.5"/>
<path class="cls-4" d="M975,236a3,3,0,1,1-3,3,3,3,0,0,1,3-3m0-3a6,6,0,1,0,6,6,6,6,0,0,0-6-6Z" transform="translate(0 -125)"/>
</g>
<g id="Ellipse_1-8" data-name="Ellipse 1">
<circle class="cls-3" cx="1050" cy="84" r="4.5"/>
<path class="cls-4" d="M1050,206a3,3,0,1,1-3,3,3,3,0,0,1,3-3m0-3a6,6,0,1,0,6,6,6,6,0,0,0-6-6Z" transform="translate(0 -125)"/>
</g>
<g id="Ellipse_1-9" data-name="Ellipse 1">
<circle class="cls-3" cx="1125" cy="90" r="4.5"/>
<path class="cls-4" d="M1125,212a3,3,0,1,1-3,3,3,3,0,0,1,3-3m0-3a6,6,0,1,0,6,6,6,6,0,0,0-6-6Z" transform="translate(0 -125)"/>
</g>
<g id="Ellipse_1-10" data-name="Ellipse 1">
<circle class="cls-3" cx="1200" cy="34" r="4.5"/>
<path class="cls-4" d="M1200,156a3,3,0,1,1-3,3,3,3,0,0,1,3-3m0-3a6,6,0,1,0,6,6,6,6,0,0,0-6-6Z" transform="translate(0 -125)"/>
</g>
<g id="Ellipse_1-11" data-name="Ellipse 1">
<circle class="cls-3" cx="450" cy="215" r="4.5"/>
<path class="cls-4" d="M450,337a3,3,0,1,1-3,3,3,3,0,0,1,3-3m0-3a6,6,0,1,0,6,6,6,6,0,0,0-6-6Z" transform="translate(0 -125)"/>
</g>
<g id="Ellipse_1-12" data-name="Ellipse 1">
<circle class="cls-3" cx="375" cy="207" r="4.5"/>
<path class="cls-4" d="M375,329a3,3,0,1,1-3,3,3,3,0,0,1,3-3m0-3a6,6,0,1,0,6,6,6,6,0,0,0-6-6Z" transform="translate(0 -125)"/>
</g>
<g id="Ellipse_1-13" data-name="Ellipse 1">
<circle class="cls-3" cx="300" cy="221" r="4.5"/>
<path class="cls-4" d="M300,343a3,3,0,1,1-3,3,3,3,0,0,1,3-3m0-3a6,6,0,1,0,6,6,6,6,0,0,0-6-6Z" transform="translate(0 -125)"/>
</g>
<g id="Ellipse_1-14" data-name="Ellipse 1">
<circle class="cls-3" cx="150" cy="223" r="4.5"/>
<path class="cls-4" d="M150,345a3,3,0,1,1-3,3,3,3,0,0,1,3-3m0-3a6,6,0,1,0,6,6,6,6,0,0,0-6-6Z" transform="translate(0 -125)"/>
</g>
<g id="Ellipse_1-15" data-name="Ellipse 1">
<circle class="cls-3" cx="225" cy="196" r="4.5"/>
<path class="cls-4" d="M225,318a3,3,0,1,1-3,3,3,3,0,0,1,3-3m0-3a6,6,0,1,0,6,6,6,6,0,0,0-6-6Z" transform="translate(0 -125)"/>
</g>
<circle class="cls-3" cx="75.19" cy="230.97" r="4.5"/>
<path class="cls-4" d="M75.19,353a3,3,0,1,1-3,3,3,3,0,0,1,3-3m0-3a6,6,0,1,0,6,6,6,6,0,0,0-6-6Z" transform="translate(0 -125)"/>
</g>
</svg>
</div>
</div>
// Bootstrap
body { font-size: 16px;}
.container { overflow: hidden;}
.row { padding-top: 72px; padding-bottom: 72px;}
#live { background-color: rgba(92,61,95,0.9); color:#f1f1f1;}
#brands { color: #ffffff; position: relative; background-color: rgb(92,61,95); }
#brands h4 { padding-top: 24px; padding-bottom: 24px;}
#brands {
h2,
h3,
h4,
p { z-index: 10; position: relative; }
}
.container svg { z-index: 5; position: absolute; top:-240px; left:0; }
Also see: Tab Triggers