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

              
                <div id="ship"></div>
              
            
!

CSS

              
                // #divtober 15: Ship
// a.singlediv.com/divtober2020

white(alpha)
  rgba(255,255,255,alpha)

html
  min-height: 400px
  overflow: scroll
  
body
  min-height: 400px
  height: 100vh
  position: relative
  background-color: darkslateblue
  overflow: hidden

div
  position: absolute
  left: 50%
  top: 50%

  &:before,
  &:after
    display: block
    content: ''
    position: absolute
    
  @media (max-width: 400px)
    &:not(.no-scale)
      transform: scale(.8)

#ship
  width: 20em
  height: 30em
  top: auto
  margin-left: 1em
  bottom: -1em
  background-repeat: no-repeat
  background-image: radial-gradient(circle, white 60%, white(0) 61%),
                    radial-gradient(circle, white 60%, white(0) 61%),
                    radial-gradient(circle, white 60%, white(0) 61%),
                    radial-gradient(circle, white 60%, white(0) 61%),
                    linear-gradient(white, white),
                    linear-gradient(40deg, white 56%,
                                           white(0) 57%),
                    radial-gradient(circle at 0 50%, lighten(darkslateblue,20) 60%,
                                                     alpha(darkslateblue,0) 60.5%)
  background-size: 3em 3em,
                   4em 4em,
                   5em 5em,
                   3.5em 3.5em,
                   3.5em 1em,
                   3.5em 3em,
                   8em 16em
  background-position: left  5em bottom -1em,
                       left  7em bottom -1em,
                       left 10em bottom -1em,
                       left 14em bottom -1em,
                       left 0 bottom 14.5em,
                       left 0 bottom 15.5em,
                       left -.8em center
  border-bottom-left-radius: 50%
  box-shadow: -1.1em 2em 0 -1em  white,
              -2.3em 4em 0 -2em  lighten(darkslateblue,50),
              -4.5em 7em 0 -4em  lighten(darkslateblue,35),
              -6.8em 10em 0 -6em lighten(darkslateblue,20),
              -7.2em 20em 0 -6em lighten(darkslateblue,20)
  @media screen and (max-width: 400px)
    bottom: -3.5em
    margin-left: -1.5em

  &:before
    width: 100%
    height: 100%
    left: calc(-100% - 1.4em)
    background-repeat: no-repeat
    background-image: radial-gradient(circle, white 60%, white(0) 61%),
                      radial-gradient(circle, white 60%, white(0) 61%),
                      radial-gradient(circle, white 60%, white(0) 61%),
                      radial-gradient(circle, white 60%, white(0) 61%),
                      linear-gradient(white, white),
                      linear-gradient(-45deg, white 56%,
                                              white(0) 57%),
                      radial-gradient(circle at 100% 50%, lighten(darkslateblue,20) 60%,
                                                          alpha(darkslateblue,0) 60.5%)
    background-size: 3em 3em,
                     4em 4em,
                     5em 5em,
                     3.5em 3.5em,
                     3.5em 1em,
                     3.5em 3em,
                     8em 16em
    background-position: right  5em bottom -1em,
                         right  7em bottom -1em,
                         right 10em bottom -1em,
                         right 14em bottom -1em,
                         right 0 bottom 14.5em,
                         right 0 bottom 15.5em,
                         right -.8em center
    border-bottom-right-radius: 50%
    box-shadow: 1.1em 2em 0 -1em  white,
                2.3em 4em 0 -2em  lighten(darkslateblue,50),
                4.5em 7em 0 -4em  lighten(darkslateblue,35),
                6.8em 10em 0 -6em lighten(darkslateblue,20)

  &:after
    width: 3em
    height: 10em
    top: 6em
    left: -2.2em
    background-color: white
    background-repeat: no-repeat
    background-image: radial-gradient(ellipse at 50% 100%, lighten(darkslateblue,35) 40%,
                                                           white(0) 42%),
                      radial-gradient(ellipse at 50% 100%, lighten(darkslateblue,35) 40%,
                                                           white(0) 42%)
    background-size: 1.5em 3.5em,
                     1.5em 3.5em
    background-position: 0 100%,
                         100% 100%
    border-top-left-radius:  3em 15em
    border-top-right-radius: 3em 15em
    box-shadow: inset 0 1.4em 0 -1em white,
                inset 0 2.5em 0 -1.5em white,
                inset  .3em 0 0 white,
                inset -.3em 0 0 white,
                inset 0 3em 0 -1.5em lighten(darkslateblue,35),
                0 -9em 0 0 darkslateblue,
                -.7em 1.5em 0 -1em white,
                 .7em 1.5em 0 -1em white
              
            
!

JS

              
                // @lynnandtonic
// a.singlediv.com

              
            
!
999px

Console