JavaScript preprocessors can help make authoring JavaScript easier and more convenient. For instance, CoffeeScript can help prevent easy-to-make mistakes and offer a cleaner syntax and Babel can bring ECMAScript 6 features to browsers that only support ECMAScript 5.
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.
HTML Settings
Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
<div class="cards">
<div class="card">
<header>
<h2>Bristol</h2>
</header>
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/12005/harbour1.jpg" alt="Bristol harbour">
<div class="body">
<p>I live in Bristol. It mostly rains, but when it isn't raining we have hot air balloons.</p>
</div>
</div>
<div class="card">
<header>
<h2>Harbour Cranes</h2>
</header>
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/12005/harbour2.jpg" alt="Bristol harbour">
<div class="body">
<p>We also have giant cranes, and historic boats. It is best if the balloons avoid these.</p>
</div>
</div>
<div class="card">
<header>
<h2>Striped Balloon</h2>
</header>
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/12005/coloured-balloon.jpg" alt="Coloured balloon">
<div class="body">
<p>I like the nice standard balloons. Stripy. Solid looking basket.</p>
</div>
</div>
<div class="card">
<header>
<h2>Fortnum & Mason</h2>
</header>
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/12005/champagne-balloons.jpg" alt="Fortnum and Mason balloon">
<div class="body">
<p>This one uses the correct Pantone colour for Fortnum and Mason.</p>
</div>
</div>
<div class="card">
<header>
<h2>Funfair Problems</h2>
</header>
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/12005/funfair-balloons.jpg" alt="Funfair">
<div class="body">
<p>Here we have balloons getting tangled up with a funfair.</p>
</div>
</div>
</div>
.cards {
display:grid;
grid-template-columns: [side-start] 1fr 1fr 1fr
[main-start] 1fr 1fr 1fr 1fr 1fr 1fr [main-end] 1fr 1fr 1fr [layout-end];
grid-gap: 10px;
}
.card:nth-child(1) {
grid-column: side-start / main-start;
}
.card:nth-child(2) {
grid-column: side-start / main-start;
grid-row: 2;
}
.card:nth-child(3) {
grid-column: main-end / layout-end;
grid-row: 2;
}
.card:nth-child(4) {
grid-column: main-start / main-end;
}
.card:nth-child(5) {
grid-column: main-end / layout-end;
}
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
body {
font: 1em/1.4 Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
background-color: #fafafa;
}
img {
max-width: 100%;
}
.cards {
margin: 0 auto;
max-width: 960px;
}
.card {
background-color: #fff;
box-shadow: 0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12);
}
.card header {
padding: 10px;
background-color: rgb(41,73,130);
color: #fff;
}
.card header h2 {
font-size: 1.4rem;
font-weight: normal;
margin: 0;
padding: 0;
}
.card .body {
padding: 10px;
font-size: .9rem;
color: #757575;
}
Also see: Tab Triggers