123

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.

            
              <ul class="airplanes">
 <li>
    <figure>
      <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/6a/C-FUKN-Northway-Aviation-DHC-3-Otter-2.jpg/600px-C-FUKN-Northway-Aviation-DHC-3-Otter-2.jpg">
      <figcaption>
        <span class="name">de Havilland Canada DHC-3 Otter</span> <span class="desc">The de Havilland Canada DHC-3 Otter is a single-engined, high-wing, propeller-driven, short take-off and landing (STOL) aircraft.</span>
      </figcaption>
    </figure>
  </li>
  
  <li>
    <figure>
      <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/29/Icelandair_Fokker_F-27-200_Friendship_Wallner.jpg/600px-Icelandair_Fokker_F-27-200_Friendship_Wallner.jpg">
      <figcaption>
        <span class="name">Fokker F27 Friendship</span> <span class="desc">The Fokker F27 Friendship is a turboprop airliner developed and manufactured by the Dutch aircraft manufacturer Fokker.</span>
      </figcaption>
    </figure>
  </li>
  
  <li>
    <figure>
      <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/09/A6-EDY_A380_Emirates_31_jan_2013_jfk_%288442269364%29_%28cropped%29.jpg/600px-A6-EDY_A380_Emirates_31_jan_2013_jfk_%288442269364%29_%28cropped%29.jpg">
      <figcaption>
        <span class="name">Airbus A380</span> <span class="desc">The Airbus A380 is the world's largest passenger airliner.</span>
      </figcaption>
    </figure>
  </li>
  
  <li>
    <figure>
      <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/32/Short_Stirling_bomber_N6101.jpg/600px-Short_Stirling_bomber_N6101.jpg">
      <figcaption>
        <span class="name">Short Stirling</span> <span class="desc">The Short Stirling was a British four-engined heavy bomber of WW2</span>
      </figcaption>
    </figure>
  </li>
  
  <li>
    <figure>
      <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/ae/Cessna_172S_Skyhawk_SP%2C_Private_JP6817606.jpg/600px-Cessna_172S_Skyhawk_SP%2C_Private_JP6817606.jpg">
      <figcaption>
        <span class="name">Cessna 172</span> <span class="desc">The Cessna 172 is a four seat, single engine aircraft.</span>
      </figcaption>
    </figure>
  </li>
                    
</ul>
            
          
!
            
              * {box-sizing: border-box; }

body {
  background-color: rgb(192,181,129);
}

img {
  max-width: 100%;
}

figure, figcaption {
  margin: 0;
}

.airplanes {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.airplanes li {
  transform: rotate(-.8deg);
  box-shadow: 1px 1px 2px 0px rgba(0,0,0,0.6);
  border: 5px solid #fff;
  border-radius: 2px 6px;
  background-color: rgba(255,255,255,.6);
  flex: 1 1 400px;
  height: 45vh;
  margin: 10px;
}

.airplanes li:nth-child(odd) {
  transform: rotate(.3deg);
}

figure {
  display: grid;
  height: 100%;
  grid-template-columns: 1fr 3fr;
  grid-template-rows: 1fr minmax(1em, auto);
}

figure img {
  width: 100%;
  height: 100%;
  grid-column: 1 / 3;
  object-fit: cover;
  border-bottom: 1px solid rgba(0,0,0,.6);
  filter: sepia(80%);
  transform: rotate(.2deg);
}

figure img:hover {
  filter: none;
}

figcaption  {
  font: 1rem 'Life Savers', cursive;
  grid-row: 2;
  grid-column: 1 / 3;
  display: flex;
  align-items: center;
}

figcaption > * {
  padding: .5rem;
}

figcaption .name {
  font-weight: bold;
  font-size: 1.2rem;
  border-right: 1px solid rgba(0,0,0,.6);
} 
            
          
!
999px
🕑 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.

Console