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.
<figure class="snip1253">
<div class="image"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample52.jpg" alt="sample52"/></div>
<figcaption>
<div class="date"><span class="day">28</span><span class="month">Oct</span></div>
<h3>The World Ended Yesterday</h3>
<p>
I don't need to compromise my principles, they don't have the slightest bearing on what happens to me anyway.
</p>
</figcaption>
<footer>
<div class="views"><i class="ion-eye"></i>2,907</div>
<div class="love"><i class="ion-heart"></i>623</div>
<div class="comments"><i class="ion-chatboxes"></i>23</div>
</footer><a href="#"></a>
</figure>
<figure class="snip1253 hover">
<div class="image"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample66.jpg" alt="sample66"/></div>
<figcaption>
<div class="date"><span class="day">17</span><span class="month">Nov</span></div>
<h3>An Abstract Post Heading</h3>
<p>
Sometimes the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.
</p>
</figcaption>
<footer>
<div class="views"><i class="ion-eye"></i>1,870</div>
<div class="love"><i class="ion-heart"></i>973</div>
<div class="comments"><i class="ion-chatboxes"></i>85</div>
</footer><a href="#"></a>
</figure>
<figure class="snip1253">
<div class="image"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample59.jpg" alt="sample59"/></div>
<figcaption>
<div class="date"><span class="day">01</span><span class="month">Dec</span></div>
<h3>Down with this sort of thing</h3>
<p>
I don't need to compromise my principles, they don't have the slightest bearing on what happens to me anyway.
</p>
</figcaption>
<footer>
<div class="views"><i class="ion-eye"></i>928</div>
<div class="love"><i class="ion-heart"></i>198</div>
<div class="comments"><i class="ion-chatboxes"></i>23</div>
</footer><a href="#"></a>
</figure>
@import url(https://fonts.googleapis.com/css?family=Raleway:400,600,700);
@import url(https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css);
figure.snip1253 {
font-family: 'Raleway', Arial, sans-serif;
color: #fff;
position: relative;
overflow: hidden;
margin: 10px;
min-width: 250px;
max-width: 310px;
width: 100%;
background-color: #ffffff;
color: #000000;
text-align: left;
font-size: 16px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
}
figure.snip1253 * {
-webkit-box-sizing: border-box;
box-sizing: border-box;
-webkit-transition: all 0.3s ease;
transition: all 0.3s ease;
}
figure.snip1253 .image {
max-height: 220px;
overflow: hidden;
}
figure.snip1253 img {
max-width: 100%;
vertical-align: top;
position: relative;
}
figure.snip1253 figcaption {
margin: -40px 15px 0;
padding: 15px ;
position: relative;
background-color: #ffffff;
}
figure.snip1253 .date {
background-color: #2980b9;
top: 15px;
color: #fff;
left: 15px;
min-height: 48px;
min-width: 48px;
position: absolute;
text-align: center;
font-size: 20px;
font-weight: 700;
text-transform: uppercase;
}
figure.snip1253 .date span {
display: block;
line-height: 24px;
}
figure.snip1253 .date .month {
font-size: 14px;
background-color: rgba(0, 0, 0, 0.1);
}
figure.snip1253 h3,
figure.snip1253 p {
margin: 0;
padding: 0;
}
figure.snip1253 h3 {
min-height: 50px;
margin-bottom: 10px;
margin-left: 60px;
display: inline-block;
font-weight: 600;
text-transform: uppercase;
}
figure.snip1253 p {
font-size: 0.8em;
margin-bottom: 20px;
line-height: 1.6em;
}
figure.snip1253 footer {
padding: 0 25px;
background-color: #20638f;
color: #e6e6e6;
font-size: 0.8em;
line-height: 30px;
text-align: right;
}
figure.snip1253 footer > div {
display: inline-block;
margin-left: 10px;
}
figure.snip1253 footer i {
color: rgba(255, 255, 255, 0.2);
margin-right: 5px;
}
figure.snip1253 a {
left: 0;
right: 0;
top: 0;
bottom: 0;
position: absolute;
z-index: 1;
}
figure.snip1253:hover img,
figure.snip1253.hover img {
-webkit-transform: scale(1.15);
transform: scale(1.15);
}
/* Demo purposes only */
$(".hover").mouseleave(
function () {
$(this).removeClass("hover");
}
);
Also see: Tab Triggers