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-creek2.png" alt="the cast of Schitt’s Creek" />

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

  <img src="https://assets.codepen.io/1025350/pose.png" alt="Pose" />

  <div class="zine">
    <img src="https://assets.codepen.io/1025350/pose.png" alt="Pose" />
  </div>

  <img src="https://assets.codepen.io/1025350/janet.jpg" alt="Janet from The Good Place" />

  <div class="zine">
    <img src="https://assets.codepen.io/1025350/janet.jpg" alt="Janet from The Good Place" />
  </div>
</div>
              
            
!

CSS

              
                .zine
  box-sizing: border-box
  width: 300px
  padding: 20px
  position: relative
  background-color: #bbb
  background-repeat: no-repeat
  background-image: linear-gradient(to right, #ddd, #777),
                    linear-gradient(to right, #ccc, #777),
                    linear-gradient(to right, #ddd, #777),
                    linear-gradient(to bottom, alpha(black,0), alpha(black,.08), alpha(black,0)),
                    linear-gradient(to bottom, alpha(black,0), alpha(black,.08), alpha(black,0)),
                    linear-gradient(to bottom, alpha(black,0), alpha(black,.08), alpha(black,0)),
                    linear-gradient(to right, alpha(black,.2), alpha(black,0) 3%)
  background-size: .5% 5%, .5% 5%, .5% 5%,
                   10% 8%, 10% 8%, 10% 8%,
                   100% 100%
  background-position: 0 10%, 0 50%, 0 90%,
                       0  9%, 0 50%, 0 91%,
                       0 0
  border-radius: 2px 1px 1px 2px
  box-shadow: 2px 1px 0 #ccc,
              3px 2px 0 #bbb,
              4px 3px 0 #ccc,
              6px 4px 0 #aaa,
              0 3px 12px alpha(black,.2),
              6px 5px 7px 1px alpha(black,.4)
  
  img
    width: 100%
    display: block
    filter: grayscale(100%) contrast(3) brightness(70%)
  
  &:before,
  &:after
    content: ''
    position: absolute
    
  &:before
    width: calc(100% - 40px)
    height: calc(100% - 40px)
    left: 50%
    top: 50%
    transform: translate(-50%,-50%)
    z-index: 2
    background-repeat: no-repeat
    background-image: linear-gradient(to right, alpha(white,0) 60%,
                                                alpha(white,.25) 65%,
                                                alpha(white,.2) 75%,
                                                alpha(white,0) 80%),
                      linear-gradient(to right, alpha(white,0) 40%,
                                                alpha(white,.1) 41%,
                                                alpha(white,.1) 41.5%,
                                                alpha(white,0) 42%),
                      linear-gradient(75deg, alpha(black,.4) 15%, alpha(black,0) 30%),
                      repeating-linear-gradient(to bottom, alpha(black,0), alpha(black,0) 2%,
                                                                           alpha(black,.15) 5%,
                                                                           alpha(black,.15) 7%,
                                                                           alpha(black,0) 12%),
                      repeating-linear-gradient(to right, alpha(black,0), alpha(black,0) .8%,
                                                                          alpha(black,.03) 1%,
                                                                          alpha(black,.03) 1.6%)
  
  &:after
    width: 100%
    height: 100%
    left: 0
    top: 0
    z-index: 3
    background-image: linear-gradient(to right, alpha(black,0) 15%, alpha(black,.15) 25%,
                                                alpha(black,.15) 30%, alpha(black,0) 40%),
                      linear-gradient(to left, alpha(black,0) 10%, alpha(black,.1) 25%,
                                               alpha(black,.1) 30%, alpha(black,0) 40%),
                      linear-gradient(-140deg, alpha(black,.02) 2%,
                                               alpha(black,.07) 3%,
                                               alpha(black,.08) 3.2%,
                                               alpha(white,.04) 3.25%,
                                               alpha(white,.04) 3.5%,
                                               alpha(white,0) 3.55%)

body
  background-color: mediumturquoise
  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

              
                
              
            
!
999px

Console