css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <div class="pin-wrapper burger">
  Hamburger
  <div class="pin"></div>
</div>

<div class="pin-wrapper icecream">
  Icecream
  <div class="pin"></div>
</div>

<div class="pin-wrapper sushi">
  Sushi
  <div class="pin"></div>
</div>

<div class="pin-wrapper pizza">
  Pizza
  <div class="pin"></div>
</div>

            
          
!
            
              $pin-width: 100px;
$pin-bg: #aaa;

*{
  box-sizing: border-box;
}
body{
  text-align: center;
}
.pin-wrapper{
  display: inline-block;
  margin: 60px 30px;
  position: relative;
  text-transform: uppercase;
  font-family: Tahoma,Verdana,Segoe,sans-serif;
  color: rgba(0,0,0,0.8);
  
  .pin{
    position: relative;
    width: $pin-width;
    height: $pin-width;
    border-radius: $pin-width * 2 $pin-width * 2 $pin-width * 2 0;
    margin-top: 20px;
    background: #00cae9;
    transform: rotate(-45deg);
    background-repeat: no-repeat;
    overflow: hidden;
    transform-origin: center center;
   -webkit-box-shadow: -5px 0px 0 rgba(0,0,0,0.2);
    box-shadow: -5px 0px 0 rgba(0,0,0,0.2);
    
   &:hover{
    animation: bounce 0.3s cubic-bezier(0.38, 0.13, 0.57, 2.08) forwards;
   }
  
  &:before{
    position: absolute;
    content: '';
    width: .3 * $pin-width; //so we'd have the same size even if we have a border in the container 
    height: .3 * $pin-width;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #fff;
    z-index: 2;
    -webkit-box-shadow: inset -5px -1px 0 rgba(0,0,0,0.2);
    box-shadow: inset -5px -1px 0 rgba(0,0,0,0.2);
  }
    
    &:after{
      position: absolute;
      content: "";
      width: 100%;
      height: 100%;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%) rotate(45deg);
      background-repeat: no-repeat;
    }
  
  }
}

.burger{
  .pin{
    background-color: #edaf4e;
  }
  .pin:after{
    background-color: #edaf4e;
    background-image: 
      radial-gradient(circle, #feefd0 50%, transparent 50%), // sesame
      radial-gradient(circle, #feefd0 50%, transparent 50%), // sesame
      radial-gradient(circle, #feefd0 50%, transparent 50%), // sesame
      radial-gradient(circle, #feefd0 50%, transparent 50%), // sesame
      linear-gradient(to bottom, #edaf4e 80%, #b97143 100%), //top-bun
      linear-gradient(to bottom, #ff4035 50%, #e31c13 100%), //tomato
      linear-gradient(to bottom, #ffbe18 0%, #ffbe18 100%), //cheese
      linear-gradient(145deg,#ffbe18 30%,transparent 30%), // melted-cheese-1
      linear-gradient(-145deg,#ffbe18 30%,transparent 30%), // melted-cheese-1
      linear-gradient(to bottom, #c35b53 0%, #612427 100%), // patty
      linear-gradient(to bottom, #ffbe18 0%, #ffbe18 100%), //cheese
      linear-gradient(145deg,#ffbe18 30%,transparent 30%), // melted-cheese-1
      linear-gradient(-145deg,#ffbe18 30%,transparent 30%), // melted-cheese-1
      linear-gradient(to bottom, #c35b53 0%, #612427 100%), // patty
      linear-gradient(to bottom, #5bb861 0%, #5bb861 100%), // lettuce - big
      radial-gradient(circle, #5bb861 50%, transparent 50%), // lettuce
      radial-gradient(circle, #5bb861 50%, transparent 50%), // lettuce
      radial-gradient(circle, #5bb861 50%, transparent 50%), // lettuce
      radial-gradient(circle, #5bb861 50%, transparent 50%), // lettuce
      ; 
    background-size: 3% 3%, 3% 3%, 3% 3%, 3% 3%,100% 30%, 100% 8%, 100% 4%, 20% 30%, 20% 30%, 100% 20%, 100% 4%, 15% 30%, 15% 30%, 100% 10%, 100% 5%,20% 20%, 35% 20%, 20% 20%, 35% 20%;
    background-position: 30% 8%, 45% 4%, 55% 8%, 65% 5%, 0 0, 0 32%, 0 38%, 100% 45%, 75% 45%, 0 38%, 0 50%, 20% 62%, 2% 62%, 0 58%, 0 63%, 0% 65%, 16% 60%, 75% 65%, 110% 60%;
  }
}

.icecream{
  .pin{
    background-color: #f6dfa5;
    background-image: repeating-linear-gradient(75deg,rgba(239,205,133,0),transparent 10px,rgba(239,205,133,1) 10px,#efcd8502 12px),repeating-linear-gradient(-15deg,transparent,transparent 10px,rgba(239,205,133,1) 10px,rgba(239,205,133,1) 12px);
  }
  .pin:after{
    background-color: transparent;
    background-image:
      radial-gradient(circle, #eb4b8a 90%, transparent 10%), // scoop
      radial-gradient(circle, #eb4b8a 50%, transparent 50%), // melted-icecream
      radial-gradient(circle, #eb4b8a 50%, transparent 50%), // melted-icecream
      radial-gradient(circle, #eb4b8a 50%, transparent 50%), // melted-icecream
      radial-gradient(circle, #eb4b8a 50%, transparent 50%), // melted-icecream
      radial-gradient(circle, #eb4b8a 50%, transparent 50%) // melted-icecream
      ;
    background-size: 100% 80%, 30% 30%, 20% 20%, 30% 30%, 20% 20%, 30% 30%;
    background-position: 0 -20%, 0 80%, 28% 80%, 50% 80%, 70% 80%, 96% 80%;
  }
}

.sushi{
  .pin{
    background-color: #363a2e;
    background-image: radial-gradient(circle, #f17932 60%, transparent 40%), //salmon
                       radial-gradient(circle, #efefef 60%, transparent 40%) //rice
    ;
    background-size: 70% 70%, 100% 100%;
    background-position: 50% 50%, 50% 50%;
  }
}

.pizza{
  .pin{
    background-color: #ffdd58;
    border-top: 10px solid #d5aa53;
    border-right: 10px solid #d5aa53;
    // border-image: linear-gradient(to top, #d5aa53 70%, #b97143 100%);
  }
  .pin:after{
    background-color: #ffdd58;
    background-image:
    radial-gradient(circle, #dd4122 50%, transparent 50%), // salami
    radial-gradient(circle, #d34326 50%, transparent 50%), // salami
    radial-gradient(circle, #dd4122 50%, transparent 50%), // salami
    radial-gradient(circle, #d34326 50%, transparent 50%), // salami
    radial-gradient(circle, #dd4122 50%, transparent 50%), // salami
    ;
    background-size: 35% 35%, 35% 35%, 35% 35%, 35% 35%, 35% 35%;
    background-position: 0 45%, 65% 2%,  35% 100%, 95% 120%, 110% 60%;
  }
}
@keyframes bounce{
  0% {
    top: 0;
  }
  50% {
    top: -12px;
  }
  100% {
    top: 0;
  }
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console