cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

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.

            
              <div class="sharpener">
  <div class="stand"></div>
  <div class="base"></div>
  <div class="handle"></div>
  <div class="gate">
    <div class="barrel">
      <div class="stem"></div>
    </div>
    <div class="pencil"></div>
  </div>
</div>
            
          
!
            
              html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
  padding: 0;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  color: #ccc;
}

.sharpener {
  position: relative;
  top: -2em;
  width: 10em;
  height: 16em;
  background-color: #fff;
  border: 0.25em solid;
  box-shadow: inset 1em -5em #f0f0f0;
}

.sharpener::before,
.sharpener::after {
  content: '';
  position: absolute;
  top: -0.625em;
  right: 99%;
  display: block;
  width: 18%;
  height: 108%;
  background-color: inherit;
  border: inherit;
  border-radius: 2em 0.5em 0.5em 2em;
  box-shadow:
    inset -0.25em 0 0 #fff,
    inset 0 -17em 0 -10em #f0f0f0;
}

.sharpener::after {
  right: auto;
  left: 99%;
  border-radius: 0.375em;
}

.stand {
  position: absolute;
  z-index: 1;
  top: -0.25em;
  left: calc(117% - 4px);
  width: 5em;
  height: 20em;
  background-color: inherit;
  border: inherit;
  border-radius: 0 5em 5em 0 / 0 5em 15em 0;
  box-shadow:
    inset -0.5em 0 0 #fff,
    inset 11em -19em 0 -10em #f0f0f0;
}

.stand::before {
  content: '';
  position: absolute;
  top: 18.5625em;
  right: 70%;
  display: block;
  width: 9em;
  height: 1.5em;
  background-color: #f0f0f0;
  border: inherit;
  border-radius: 1.5em 1.5em 0 0;
  box-shadow: inset -0.25em 0 0 #fff;
}

.stand::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -1.3125em;
  display: block;
  width: 2.625em;
  height: 2em;
  background-image:
    radial-gradient(
      circle at 0 0,
      rgba(204,0,0,0) 1em,
      currentColor 1.0625em,
      currentColor 1.25em,
      #f0f0f0 1.3125em
    );
  border-bottom-right-radius: 1.5em;
}

.base {
  position: absolute;
  top: 19.8125em;
  left: -60%;
  width: 22.5em;
  height: 1.75em;
  background-color: #f0f0f0;
  border: inherit;
  border-radius: 20em 5em 0 0 / 5em 5em 0 0;
  box-shadow: inset -0.125em 0.5em #fff;
}

.handle {
  position: absolute;
  top: 4.75em;
  left: 15em;
  width: 2.5em;
  height: 2.5em;
  background-color: inherit;
  border: inherit;
  border-radius: 0.25em;
  box-shadow: inset 0 -3em #f0f0f0;
}

.handle::before,
.handle::after {
  content: '';
  position: absolute;
  z-index: 1;
  top: -0.5em;
  left: 2em;
  displayt: block;
  width: 1em;
  height: 9em;
  background-color: inherit;
  border: inherit;
  border-radius: 0.25em;
}

.handle::before {
  animation: turn 0.5s linear infinite alternate;
}

.handle::after {
  z-index: 0;
  top: 6em;
  left: 1.5em;
  height: 2em;
  width: 4em;
  border-radius: 0.5em;
  box-shadow: inset 1em -0.5em #f0f0f0;
  animation: move 1s linear infinite;
}

.gate {
  position: absolute;
  z-index: -1;
  top: 0.625em;
  right: 11.5em;
  width: 1.5em;
  height: 11em;
  background-color: inherit;
  border: inherit;
  border-radius: 0.625em 0.25em 0.25em 0.625em;
  box-shadow: inset 0 -9em 0 -5em #f0f0f0;
}

.gate::before,
.gate::after {
  content: '';
  position: absolute;
  top: 12%; 
  left: -0.75em;
  displayt: block;
  width: 0.75em;
  height: 1.5em;
  background-color: inherit;
  border: inherit;
  border-radius: 0.5em 0 0 0.5em;
}

.gate::after {
  top: auto;
  bottom: 12%;
}

.barrel {
  position: absolute;
  z-index: -1;
  top: 3.75em;
  left: 100%;
  width: 2.5em;
  height: 2.75em;
  background-color: inherit;
  border: inherit;
  border-radius: 0.25em;
  box-shadow: inset 0 -3em #f0f0f0;
}

.barrel::before {
  content: '';
  position: absolute;
  top: -7.5em; 
  left: -1em;
  displayt: block;
  width: 2.5em;
  height: 3em;
  background-image:
    radial-gradient(
      circle at 100% 100%,
      rgba(204,0,0,0) 1.5em,
      currentColor 1.5625em,
      currentColor 1.75em,
      #fff 1.8125em,
      #fff 2.125em,
      currentColor 2.1875em,
      currentColor 2.375em,
      rgba(204,0,0,0) 2.4375em
    );
}

.barrel::after {
  content: '';
  position: absolute;
  top: -6.875em; 
  left: 1.375em;
  displayt: block;
  width: 0.5em;
  height: 0.8125em;
  background-color: inherit;
  border: inherit;
  border-left: none;
  border-radius: 0 0.5em 0.5em 0;
}

.stem {
  position: absolute;
  top: -4.5em; 
  left: -0.875em;
  width: 0.625em;
  height: 0.25em;
  transform: translateX(-0.03125em);
  background-color: inherit;
  border: inherit;
  border-top: none;
  border-bottom: none;
}

.stem::before {
  content: '';
  position: absolute;
  top: -0.1875em; 
  left: 0.125em;
  displayt: block;
  width: 0.4375em;
  height: 0.1875em;
  background-color: currentColor;
  border-radius: 0.25em 0 0.25em;
}

.pencil {
  position: absolute;
  top: 4.125em;
  left: -9em;
  width: 9em;
  height: 2em;
  background-color: inherit;
  background-image: linear-gradient(0deg, #f0f0f0 50%, #fff 50%);
  border: inherit;
  border-radius: 0.5em 0 0 0.5em;
  box-shadow: inset 1em 0 #f0f0f0;
  animation: spin 0.5s linear infinite;
}

.pencil::before {
  content: '';
  position: absolute;
  top: -0.5em; 
  left: 0.75em;
  displayt: block;
  width: 0.875em;
  height: 2.5em;
  background-color: currentColor;
  border: inherit;
  border-radius: 0.25em;
}

@keyframes spin {
  100% { background-position: center 3em; }
}

@keyframes turn {
  0% { top: -0.5em; }
  49.9% { top: -0.5em; }
  50% { top: auto; bottom: -0.5em; height: 3em; }
  100% { top: auto; bottom: -0.5em; }
}

@keyframes move {
  0% { z-index: 0; transform: translateY(0); }
  49.9% { z-index: 0; transform: translateY(-12em); }
  50% { z-index: -1; transform: translateY(-12em); }
  100% { z-index: -1; transform: translateY(0); }
}


            
          
!
999px
Loading ..................

Console