cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

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.

            
              h1 Oreo Cheesecake

.cheesecake
  .cake-top
    .oreo
    .oreo
    div
    div
    div
  .cake-body
    div
    div
    div
    div
    div
            
          
!
            
              @import url('https://fonts.googleapis.com/css?family=Pacifico')
@import url('https://fonts.googleapis.com/css?family=Roboto')

body
  background: #eb8258
  
  h1
    text-align: center
    font-family: Pacifico
    font-size: 60px
    color: #1a1a1a
    line-height: 68px
  
  .cheesecake
    position: relative
    height: 200px
    width: 240px
    margin: 10px auto
    //border: 1px solid red
    
    .cake-top
      position: absolute
      top: 50px
      left: 0px
      width: 240px
      border-bottom: 30px solid #351C15
      border-left: 40px solid transparent
      border-right: 200px solid transparent
      box-sizing: border-box
      z-index: 1000
      
      & div
        position: absolute
        top: 32px
        width: 12px
        height: 45px
        background: #351C15
        border-radius: 0px 0px 6px 6px
        &:nth-child(3)
          left: 35px
          height: 70px
        
        &:nth-child(4)
          left: 65px
          height: 30px
        
        /*&::after
          content: ""
          position: absolute
          bottom: -5px
          left: -1px
          height: 12px
          width: 12px
          border-radius: 50%
          background: #351C15
      
      .oreo:nth-child(1)
        position: absolute
        top: -40px
        left: 40px
        height: 70px
        width: 70px
        border-radius: 50%
        background: #23130E
        transform: rotateY(20deg)
  
        &::after
          content: ""
          position: absolute
          top: 6px
          left: 6px
          height: 58px
          width: 58px
          border: 3px solid #1C0F0B
          box-sizing: border-box
          border-radius: 50%
  
        &::before
          content: "OREO"
          position: absolute
          top: 50%
          left: 50%
          transform: translate(-50%, -50%)
          font-family: Roboto
          font-size: 12px
          border: 2px solid #1C0F0B
          padding: 3px 5px
          box-sizing: border-box
          border-radius: 50%
          color: #1C0F0B
          font-weight: bold
  
      .oreo:nth-child(2)
        position: absolute
        top: 0px
        left: 20px
        height: 10px
        width: 70px
        background: #23130E
        border-radius: 10px
        z-index: -1
        
        &::after
          content: ""
          position: absolute
          top: 10px
          left: 2px
          height: 4px
          width: 66px
          background: #eee
        
        &::before
          content: ""
          position: absolute
          top: 14px
          left: 0px
          height: 10px
          width: 70px
          background: #23130E
          border-radius: 10px
        
    .cake-body
      position: absolute
      top: 80px
      left: 0px
      height: 100px
      width: 240px
      box-sizing: border-box
      border: 5px solid #351C15
      background: #ffe381
      border-bottom-width: 20px
      z-index: 0
      overflow: hidden
      
      &::after
        content: ""
        position: absolute
        bottom: 0px
        height: 15px
        width: 230px
        box-sizing: border-box
        background: #5F432A
      
      & div
        position: absolute
        height: 16px
        width: 16px
        background: #351C15
        border-radius: 50%
        filter: blur(0.2px)
        
        &:nth-child(1)
          top: 30px
          left: 10px
        
        &:nth-child(2)
          top: 15px
          left: 50px
        
        &:nth-child(3)
          top: 50px
          left: 100px
        
        &:nth-child(4)
          top: 25px
          left: 160px
        
        &:nth-child(5)
          top: 15px
          left: 220px
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console