Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

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.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

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.

Behavior

Auto Save

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <ul class="slider">
  <li class="one">
    <a href="javascript:;">
      <h1>One</h1>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Maxime laborum non suscipit nesciunt veritatis nisi fugiat, labore autem aspernatur ratione dolore, itaque, fugit expedita sint.</p>
    </a>
  </li>
  <li class="two">
    <a href="javascript:;">
      <h1>Two</h1>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Beatae maxime minus similique. Minus provident, omnis temporibus, voluptatum, odit cum maiores tempora, nobis explicabo ipsum?</p>
    </a>
  </li>
  <li class="three">
    <a href="javascript:;">
      <h1>Three</h1>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Praesentium, quis explicabo architecto tempore quia, laboriosam beatae illo eveniet nihil, aliquam vel. Officiis officia, a?</p>
    </a>
  </li>
  <li class="four">
    <a href="javascript:;">
      <h1>Four</h1>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Molestiae quibusdam sed dolores, pariatur minus porro ea sunt fugiat necessitatibus, ipsum est cum tempore quas dolore.</p>
    </a>
  </li>
  <li class="five">
    <a href="javascript:;">
      <h1>Five</h1>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Incidunt quam culpa amet in, earum minus non soluta, quas autem, distinctio assumenda, libero rem reprehenderit facilis.</p>
    </a>
  </li>
</ul>
              
            
!

CSS

              
                @import "bourbon@5.*"
body
  background: rgba(0,0,0,0.85)
  margin: 0
.slider
  list-style: none
  display: flex
  justify-content: center
  align-items: flex-start
  flex-wrap: nowrap
  width: 100%
  height: 100vh
  margin: 0 auto
  padding: 0
  li
    +position(relative,null)
    background: none no-repeat center/cover
    min-height: 100%
    overflow: hidden
    flex-grow: 1
    transition: 0.75s cubic-bezier(0.4,0,0.2,1)
    &:hover
      flex-grow: 5
      h1
        transform: rotateZ(0) translateY(0)
      p
        transform: translateY(calc((100% + 2rem) * -1)) rotateZ(0)
  a
    +position(absolute,0 0 0 0)
    display: block
    width: 100%
    height: 100%
  h1
    +position(absolute, 1rem null null 1rem)
    margin: 0
    font-size: 3rem
    color: white
    text-transform: uppercase
    transform-origin: left top
    transform: rotateZ(90deg) translateY(-1em)
    font-family: sans-serif
    transition: 0.25s cubic-bezier(0.35,0, 0, 1)
    text-shadow: 0 0 10px rgba(0,0,0,0.25)
  p
    +position(absolute,100% 1rem null 1rem)
    padding: 1rem
    font-family: sans-serif
    transform-origin: left top
    transform: translateY(0) rotateZ(90deg)
    transition: 0.5s cubic-bezier(0.35,0, 0, 1)
    // max-width: calc(100% - 2rem)
    width: 25em
    color: rgba(0,0,0,0.65)
    background: rgba(255,255,255,0.9)
    line-height: 1.5
    border-radius: 0.25rem
    box-shadow: 0 0 20px rgba(0,0,0,0.15)
  .one
    background-image: url(https://unsplash.it/800/600/?random)
  .two
    background-image: url(https://unsplash.it/801/600/?random)
  .three
    background-image: url(https://unsplash.it/802/600/?random)
  .four
    background-image: url(https://unsplash.it/803/600/?random)
  .five
    background-image: url(https://unsplash.it/804/600/?random)
              
            
!

JS

              
                
              
            
!
999px

Console