Pen Settings

HTML

CSS

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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

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

              
                <div class="container">

  <img src="https://assets.codepen.io/1025350/schitts-creek.png" alt="the cast of Schitt’s Creek" />

  <div class="poster">
    <img src="https://assets.codepen.io/1025350/schitts-creek.png" alt="the cast of Schitt’s Creek" />
  </div>

  <img src="https://assets.codepen.io/1025350/newfoundglory.png" alt="New Found Glory tour poster: 20 years of pop punk" />

  <div class="poster">
    <img src="https://assets.codepen.io/1025350/newfoundglory.png" alt="New Found Glory tour poster: 20 years of pop punk" />
  </div>

  <img src="https://assets.codepen.io/1025350/paper-heart.png" alt="movie poster for Charlyne Yi’s Paper Heart" />

  <div class="poster">
    <img src="https://assets.codepen.io/1025350/paper-heart.png" alt="movie poster for Charlyne Yi’s Paper Heart" />
  </div>

</div>
              
            
!

CSS

              
                .poster
  width: 300px
  padding: 7%
  position: relative
  box-sizing: border-box
  background-color: white
  box-shadow: 0 3px 12px alpha(black,.2)
  filter: saturate(70%) contrast(85%)
  
  img
    width: 100%
    display: block
    z-index: 1
  
  &:before,
  &:after
    content: ''
    width: 100%
    left: 0
    position: absolute
  
  &:before
    height: 4%
    bottom: -4%
    background-repeat: no-repeat
    background-image: linear-gradient(177deg,  alpha(black,.22) 10%, transparent 50%),
                      linear-gradient(-177deg, alpha(black,.22) 10%, transparent 50%)
    background-size: 49% 100%
    background-position: 2% 0,
                         98% 0

  &:after
    height: 100%
    top: 0
    z-index: 2
    background-repeat: no-repeat
    background-image: linear-gradient(to right,  alpha(white,.1) .5%, alpha(black,.15) 1.2%, transparent 1.2%),
                      linear-gradient(to bottom, alpha(white,.1) .5%, alpha(black,.15) 1.2%, transparent 1.2%),
                      linear-gradient(to bottom, alpha(white,.1) .5%, alpha(black,.15) 1.2%, transparent 1.2%),
                      linear-gradient(265deg,  alpha(black,.2), transparent 10%),
                      linear-gradient(5deg,    alpha(black,.2), transparent 15%),
                      linear-gradient(-5deg,   alpha(black,.1), transparent 10%),
                      linear-gradient(5deg,    alpha(black,.1), transparent 10%),
                      linear-gradient(-265deg, alpha(black,.2), transparent 10%),
                      linear-gradient(-5deg,   alpha(black,.2), transparent 15%),
                      linear-gradient(266deg,  alpha(black,.2), transparent 10%)
    background-size: 50% 100%,
                     100% 33.3333%,
                     100% 33.3333%,
                     50% 33.3333%,
                     50% 33.3333%,
                     50% 33.3333%,
                     50% 33.3333%,
                     50% 33.3333%,
                     50% 33.3333%,
                     50% 33.3333%
    background-position: right top,
                         left center,
                         left bottom,
                         left  top,
                         left  top,
                         right top,
                         left  center,
                         right center,
                         right center,
                         left  bottom

body
  background-color: lightsalmon
  padding: 60px 20px
  
.container
  width: 650px
  display: grid
  grid-template-columns: 1fr 1fr
  align-items: center
  justify-items: center
  gap: 60px 30px
  margin: 0 auto

  > img
    width: 250px
              
            
!

JS

              
                // @lynnandtonic
// a.singlediv.com
              
            
!
999px

Console