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 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

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

              
                <section class="pumpkin-patch">
  <div class="pumpkin">
    <div class="pumpkin__stem"></div>
    <div class="pumpkin-eyes">
      <div class="pumpkin__eye pumpkin__eye--left"></div>
      <div class="pumpkin__eye pumpkin__eye--right"></div>
    </div>
    <div class="pumpkin__nose"></div>
    <div class="pumpkin__mouth">
      <span class="tooth tooth--left"></span>
      <span class="tooth tooth--right"></span>
    </div>
  </div>
</section>
              
            
!

CSS

              
                :root {
  --yellow-bright: #ffde44;
  --yellow-dim: #997e00;
  --orange-bright: #ec8000;
  --orange-dim: #422400;
  --pumpkin-bright: #ff9900;
  --pumpkin-dark: #eb8d00;
}

@keyframes wobble {
  from {
    transform: rotate(-3deg);
  }
  to {
    transform: rotate(3deg);
  }
}

@keyframes glowTriangle {
  from {
    border-bottom-color: var(--yellow-bright);
  }
  to {
    border-bottom-color: var(--yellow-dim);
  }
}

@keyframes glowTriangle2 {
  from {
    border-bottom-color: var(--orange-bright);
  }
  to {
    border-bottom-color: var(--orange-dim);
  }
}

@keyframes mouth {
  from {
    background-color: var(--yellow-bright);
  }
  to {
    background-color: var(--yellow-dim);
  }
}

@keyframes mouth2 {
  from {
    background-color: var(--orange-bright);
  }
  to {
    background-color: var(--orange-dim);
  }
}

/* background */
.pumpkin-patch {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: linear-gradient(0deg, rgba(79,56,5,1) 0%, rgba(2,0,36,1) 63%, rgba(55,9,121,1) 63%, rgba(0,0,0,1) 100%);
}

.pumpkin {
  height: 400px;
  width: 500px;
  border-radius: 46% 46% 36% 36%;
  position: relative;
  background-image: linear-gradient(90deg, var(--pumpkin-bright) 25%, var(--pumpkin-dark) 25%, var(--pumpkin-dark) 50%, var(--pumpkin-bright) 50%, var(--pumpkin-bright) 75%, var(--pumpkin-dark) 75%, var(--pumpkin-dark) 100%);
background-size: 250px auto;
  box-shadow: inset 30px 30px 50px 0px rgba(0,0,0,.7), inset -30px -30px 50px 0px rgba(0,0,0,.7), 0 70px 100px -80px #000;
  
  animation-name: wobble;
  animation-duration: 6s;
  animation-timing-function: ease-in-out;
  animation-direction: alternate;
  animation-iteration-count: infinite;
}

.pumpkin__stem {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  height: 50px;
  width: 80px;
  background-image: linear-gradient(90deg, #028c0d 25%, #1d7d05 25%, #1d7d05 50%, #028c0d 50%, #028c0d 75%, #1d7d05 75%, #1d7d05 100%);
background-size: 40px auto;
}

.pumpkin-eyes {
  display: flex;
  justify-content: space-around;
  margin-top: 3rem;
  padding: 0 4rem;
}

.pumpkin__eye {
  margin: 0 auto;
  position: relative;
  height: 90px;
  width: 120px;
}

.pumpkin__eye::before,
.pumpkin__eye::after {
  content: '';
  display: block;
  position: absolute;
  width: 0; 
  height: 0;
  animation-duration: 3s;
  animation-timing-function: ease-in-out;
  animation-direction: alternate;
  animation-iteration-count: infinite;
}

.pumpkin__eye::before {
  z-index: 2;
  top: 15px;
  left: 10px;
  border-left: 50px solid transparent;
  border-right: 50px solid transparent;
  border-bottom: 75px solid var(--yellow-bright);
  animation-name: glowTriangle;
}

.pumpkin__eye::after {
  z-index: 1;
  top: 0;
  left: 0;
  border-left: 60px solid transparent;
  border-right: 60px solid transparent;
  border-bottom: 90px solid var(--orange-bright);
  animation-name: glowTriangle2;
}

.pumpkin__eye--left {
  transform: rotate(-4deg);
}

.pumpkin__eye--right {
  transform: rotate(4deg);
}

.pumpkin__nose {
  margin-top: 2rem;
  height: 60px;
  position: relative;
}

.pumpkin__nose::before,
.pumpkin__nose::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  animation-duration: 3s;
  animation-timing-function: ease-in-out;
  animation-direction: alternate;
  animation-iteration-count: infinite;
}

.pumpkin__nose::before {
  z-index: 2;
  border-left: 34px solid transparent;
  border-right: 34px solid transparent;
  border-bottom: 51px solid var(--yellow-bright);
  animation-name: glowTriangle;
}

.pumpkin__nose::after {
  z-index: 1;
  border-left: 40px solid transparent;
  border-right: 40px solid transparent;
  border-bottom: 60px solid var(--orange-bright);
  animation-name: glowTriangle2;
}

.pumpkin__mouth {
  margin-top: 3rem;
  height: 120px;
  overflow: hidden;
  position: relative;
}

.pumpkin__mouth::before,
.pumpkin__mouth::after {
  content: '';
  position: absolute;
  display: block;
  top: 0;
  left: 50%;
  animation-duration: 3s;
  animation-timing-function: ease-in-out;
  animation-direction: alternate;
  animation-iteration-count: infinite;
}

.pumpkin__mouth::before {
  z-index: 2;
  height: 126px;
  width: 306px;
  background: var(--yellow-bright);
  border-radius: 50%;
  transform: translateY(-55%) translateX(-50%);
  animation-name: mouth;
}

.pumpkin__mouth::after {
  z-index: 1;
  height: 140px;
  width: 340px;
  background: var(--orange-bright);
  border-radius: 50%;
  transform: translateY(-50%) translateX(-50%);
  animation-name: mouth2;
}

.pumpkin__mouth .tooth {
  position: absolute;
  z-index: 3;
  top: 0;
  background: #eb8d00;
  height: 30px;
  width: 40px;
}

.pumpkin__mouth .tooth--left {
  left: 188px;
  background: var(--pumpkin-dark);
}

.pumpkin__mouth .tooth--right {
  left: 272px;
  background: var(--pumpkin-bright);
}
              
            
!

JS

              
                
              
            
!
999px

Console