Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

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.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

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.

autor: Marco Barría

<div class="container-fluid">
  <div id="content" class="row"></div>

<script id="template" type="text/x-handlebars-template">
    <div class="col-md-4 col-lg-3 col-xs-6 item nopadding">
      <div class="overflow">
        <div class="content-art">
        <img src="{{img}}" alt="{{alt}}" class="img-responsive"/>
              @import url(;

.item {
  cursor: pointer;
  -webkit-backface-visibility: hidden;
  &:hover > .overflow > .content-art {
    transform: translateY(0) translateZ(0);

.overflow {
  overflow: hidden;
  position: relative;
  width: 100%;
  height: 100%;

.content-art {
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 100%);
  color: #fff;
  font-weight: 700 !important;
  text-align: center;
  text-shadow: 0 1px 1px #000;
  padding: 10px 15px;
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: auto;
  z-index: 100;
  -webkit-backface-visibility: hidden;
  transform: translateY(100%) translateZ(0);
  transition: transform 450ms ease-out;

.nopadding {
   padding: 0 !important;
   margin: 0 !important;

*:before {
  box-sizing: border-box;

body {
  width: 100%;
  height: 100%;

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizelegibility;

body {
  background: #1f253d;
  font-family: 'Ubuntu', sans-serif;
              $(document).ready(function() {
  var data = { gallery: [
    {title: "Ella me quiso, a veces yo también la quería", img: "", alt: "lorem" },
    {title: "Puedo escribir los versos más tristes esta noche", img: "", alt: "lorem" },
    {title: "Mi voz buscaba el viento para tocar su oído", img: "", alt: "lorem" },
    {title: "Mi alma no se contenta con haberla perdido", img: "", alt: "lorem" },
    {title: "El viento de la noche gira en el cielo y canta", img: "", alt: "lorem" },
    {title: "La noche está estrellada, y tiritan, azules, los astros, a lo lejos", img: "", alt: "lorem" },
    {title: "Cómo no haber amado sus grandes ojos fijos", img: "", alt: "lorem" },
    {title: "De otro. Será de otro. Como antes de mis besos.", img: "", alt: "lorem" }
  var source   = $('#template').html();
  var template = Handlebars.compile(source);

  var $items = $('.item');
    mousemove: function(e) {
      var $that = $(this);
      $that.find('.overflow > img').velocity({
        translateZ: 0,
        translateX: Math.floor((e.pageX - $that.offset().left) - ($that.width() / 2)),
        translateY: Math.floor((e.pageY - $that.offset().top) - ($that.height() / 2)),
        scale: '2'
      }, {
        duration: 400,
        easing: 'linear',
        queue: false
    mouseleave: function() {
      $(this).find('.overflow > img').velocity({
        translateZ: 0,
        translateX: 0,
        translateY: 0,
        scale: '1'
      }, {
        duration: 1000,
        easing: 'easeOutSine',
        queue: false
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.