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

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

              
                <div class="container">

  <div class="diskette">
    <div class="diskette-top">
      <div class="hd-zone">
        <div class="h-stick"></div>
        <div class="h-inner-container">
          <div class="h-square up"></div>
          <div class="h-square down"></div>
        </div>
        <div class="h-stick"></div>
        <div class="d-container">
          <div class="d-inner-arc"></div>
          <div class="d-external-arc"></div>
        </div>
      </div>
      <div class="gap-container">
        <div class="protector">
          <div class="gap"></div>
        </div>
      </div>
    </div>
    <div class="diskette-bottom">
      <div class="left lateral">
        <div class="little-gap writelock"></div>
      </div>
      <div class="gap-container">
        <div class="label"><!-- Manz.dev --></div>
      </div>
      <div class="right lateral">
        <div class="little-gap"></div>
      </div>
    </div>
  </div>

  <div class="diskette reversed">
    <div class="diskette-top">
      <div class="lateral left top"></div>
      <div class="gap-container">
        <div class="protector">
          <div class="gap"></div>
        </div>
      </div>
      <div class="lateral right top"></div>
    </div>
    <div class="diskette-medium">
      <div class="core-gap">
        <div class="core">

        </div>
      </div>
    </div>
    <div class="diskette-bottom">
      <div class="left lateral">
        <div class="little-gap writelock"></div>
      </div>
      <div class="gap-container"></div>
      <div class="right lateral">
        <div class="little-gap"></div>
      </div>
    </div>
  </div>

</div>

<div class="created">
  <span>Created by</span>
  <a href="https://manz.dev/">
    <h2>Manz.dev</h2>
  </a>
  <p>on <a href="https://twitch.tv/ManzDev">Twitch</a> / <a href="https://youtu.be/jSia5SigafE">Youtube</a></p>
</div>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Walter+Turncoat&display=swap');
@use postcss-nested;

:root {
  --background-color: #fff;
  --diskette-color: #1a62b7;
  --diskette-metal-color: #c7c9ca;
  --metal-line-color: rgba(0, 0, 0, 0.04);
  --diskette-core-color: #bab1ac;
  --diskette-label-color: #eee;
  --diskette-label-primary-color: #e62e2e;
  --diskette-tape-color: #222;
  --hd-text-color: rgba(0, 0, 0, 0.25);
  --diskette-metal-pattern:
    linear-gradient(to bottom, transparent 0 2px, rgba(255, 255, 255, 0.65) 32px 33px, transparent 64px),
    repeating-linear-gradient(
      to right,
      transparent 0 2px,
      var(--metal-line-color) 2px 3px,
      transparent 3px 4px,
      var(--metal-line-color) 4px 5px,
      transparent 5px 7px,
      var(--metal-line-color) 7px 8px,
      transparent 8px 9px,
      var(--metal-line-color) 9px 11px
    );
  --diskette-label-pattern:
    linear-gradient(to bottom, var(--diskette-label-primary-color) 0 30px, transparent 30px 100%),
    repeating-linear-gradient(to bottom, transparent 0 30px, var(--diskette-label-primary-color) 30px 31px);
  --hd-text-width: 2px;
  --diskette-size: 300px;
  --diskette-corner-shape: polygon(0% 0%, 79% 0%, 79% 3%, 80% 3%, 82% 1%, 89% 1%, 89.5% 0%, 94% 0%, 100% 5%, 100% 100%, 0% 100%);
}

.container {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.diskette {
  margin: 1em;
  width: var(--diskette-size);
  height: var(--diskette-size);
  background: var(--diskette-color);
  border-radius: 5px;
  clip-path: var(--diskette-corner-shape);
  box-shadow:
    2px 2px 1px rgba(0, 0, 0, 0.1) inset,
    4px 4px 1px rgba(0, 0, 0, 0.05) inset;

  & .diskette-top {
    width: 100%;
    height: 40%;
    position: relative;

    & .hd-zone {
      position: absolute;
      right: 24px;
      width: 24px;
      height: 24px;
      color: rgba(255, 255, 255, 0.1);
      top: 24px;
      display: flex;

      & .h-stick {
        background: var(--hd-text-color);
        width: var(--hd-text-width);
        height: 100%;
        margin-right: 2px;
      }

      & .h-inner-container {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        margin-right: 2px;
      }

      & .h-square {
        border: var(--hd-text-width) solid var(--hd-text-color);
        width: 6px;
        height: 37%;

        &.up { border-top: 0; }
        &.down { border-bottom: 0; }
      }

      & .d-container {
        margin-left: 35%;
        position: absolute;
        width: 96%;
        height: 96%;

        & .d-inner-arc,
        & .d-external-arc {
          position: absolute;
          width: 90%;
          height: 90%;
          border: var(--hd-text-width) solid var(--hd-text-color);
          border-left: 0;
          border-radius: 50%;
          clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
        }

        & .d-inner-arc {
          width: 75%;
          height: 65%;
          transform: translate(0, 3px);
          clip-path: polygon(60% 0, 100% 0, 100% 100%, 60% 100%);
        }
      }
    }

    & .gap-container {
      width: 67%;
      height: 88%;
      border: 2px solid rgba(0, 0, 0, 0.25);
      border-top: 0;
      border-radius: 0 0 15px 15px;
      transform: translate(15%, 0);
      display: flex;
      justify-content: flex-end;

      &::before {
        position: absolute;
        left: 0;
        content: "";
        display: block;
        background: rgba(255, 255, 255, 0.1);
        width: 20px;
        height: 100%;
        transform: translateX(-3px);
        border-bottom-left-radius: 15px;
        clip-path: polygon(0 0, 3px 0, 3px 100%, 0 100%);
      }

      &::after {
        position: absolute;
        z-index: 5;
        left: 0;
        content: "";
        display: block;
        width: 15px;
        height: 3px;
        background: var(--background-color);
        clip-path: polygon(0 0, 100% 0, 75% 100%, 0 100%);
      }
    }

    &:hover .protector {
      transform: translate(-24%, -2%);
      position: relative;
      transition: transform 1s;

      & .gap::before {
        transform: translate(0, 0);
        transition: transform 1s;
      }
    }

    & .protector {
      width: 80%;
      height: 100%;
      background-color: var(--diskette-metal-color);
      background-image: var(--diskette-metal-pattern);
      display: flex;
      justify-content: flex-end;
      border-radius: 0 0 12px 12px;
      transform: translate(2%, -2%);
      transition: transform 0.05s ease-in-out;
      z-index: 6;

      & .gap {
        width: 25%;
        height: 80%;
        background: var(--diskette-color);
        transform: translate(-50%, 15%);
        border-radius: 2px;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
        overflow: hidden;

        &::before {
          position: absolute;
          width: 100%;
          height: 100%;
          content: "";
          display: block;
          background: var(--diskette-tape-color);
          transform: translate(-42px, 0);
          transition: transform 0.05s;
        }
      }
    }
  }

  & .diskette-bottom {
    width: 100%;
    height: 60%;
    display: flex;
    justify-content: center;
    align-items: flex-end;

    & .lateral {
      width: 10%;
      height: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-end;

      &.left::before {
        content: "⇧";
        display: block;
        font-size: 28px;
        color: rgba(0, 0, 0, 0.15);
        position: absolute;
        top: 26px;
        text-shadow: 0 0 1px rgba(0, 0, 0, 0.25);
      }

      & .little-gap {
        width: 50%;
        height: 7%;
        background: var(--background-color);
        margin-bottom: 55%;
        border-radius: 2px;

        &.writelock {
          background: black;
        }
      }
    }

    & .gap-container {
      width: 80%;
      height: 90%;
      border: 2px solid rgba(0, 0, 0, 0.4);
      border-bottom: 0;
      border-radius: 10px 10px 0 0;
      position: relative;

      &::before {
        position: absolute;
        left: 0;
        content: "";
        display: block;
        background: rgba(255, 255, 255, 0.1);
        width: 20px;
        height: 100%;
        transform: translateX(-3px);
        border-top-left-radius: 15px;
        clip-path: polygon(0 0, 3px 0, 3px 100%, 0 100%);
      }

      & .label {
        width: 100%;
        height: 100%;
        background-color: var(--diskette-label-color);
        background-image: var(--diskette-label-pattern);
        border-radius: 10px 10px 0 0;
        font-family: "Walter Turncoat";
        font-size: 32px;
        color: #222;
        line-height: 480%;
        text-align: center;
      }
    }
  }
}

.diskette.reversed {
  transform: scale(-1, 1);
  box-shadow:
    -2px 2px 1px rgba(0, 0, 0, 0.1) inset,
    -4px 4px 1px rgba(0, 0, 0, 0.05) inset;

  & .diskette-top {
    display: flex;

    & .gap-container {
      &::after {
        content: "";
        display: block;
        background: rgba(0, 0, 0, 0.25);
        width: 50%;
        height: 3px;
        border-radius: 35px;
        border: 1px inset rgba(0, 0, 0, 0.05);
        border-top-color: rgba(255, 255, 255, 0.25);
        transform: translate(5px, 5px);
      }
    }

    & .protector {
      &::before,
      &::after {
        --x: 0;
        --y: 8px;

        content: "";
        width: 12px;
        height: 5px;
        background: var(--diskette-color);
        transform: translate(var(--x), var(--y));
        position: relative;
        z-index: 5;
      }

      &::before { --x: 6px; }
      &::after { --x: -142px; }
    }

    & .lateral {
      &::before,
      &::after {
        position: absolute;
        content: "";
        display: block;
        width: 15px;
        height: 15px;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.5);
      }

      &.left::before {
        transform: translate(6px, 55px);
      }

      &.right::before {
        transform: translate(72px, 50px);
      }

      &.left::after {
        transform: translate(-6px, 35px);
        background: rgba(0, 0, 0, 0.3);
      }

      &.right::after {
        transform: translate(86px, 30px);
        background: rgba(0, 0, 0, 0.3);
      }
    }
  }

  & .diskette-medium {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;

    & .core-gap {
      width: 28%;
      height: 28%;
      border-radius: 50%;
      background-color: var(--diskette-tape-color);

      & .core {
        width: 90%;
        height: 90%;
        border-radius: 50%;
        background-color: var(--diskette-core-color);
        transform: translate(4px, 4px);
        display: flex;
        justify-content: center;
        align-items: center;
        border: 2px solid rgba(255, 255, 255, 0.5);
        border-right: 0;

        &::before {
          position: absolute;
          content: "";
          display: block;
          background: var(--diskette-tape-color);
          width: 14px;
          height: 14px;
          border-radius: 4px;
          border: 2px solid rgba(255, 255, 255, 0.65);
          transform: rotate(-20deg);
        }

        &::after {
          position: absolute;
          content: "";
          display: block;
          width: 26px;
          height: 16px;
          border-radius: 3px;
          border-top-left-radius: 7px;
          background: var(--diskette-color);
          transform: translate(-12px, -20px) rotate(-15deg);
          box-shadow: 2px -2px 8px rgba(0, 0, 0, 0.5) inset;
        }
      }
    }
  }

  & .diskette-bottom {
    & .gap-container {
      height: 25%;
      transform: scale(-1, 1);

      &::after {
        position: absolute;
        right: 5px;
        top: -13px;
        content: "";
        display: block;
        width: 25%;
        height: 8px;
        border-radius: 8px;
        border: 1px solid rgba(0, 0, 0, 0.25);
        border-top: 0;
        border-left-color: #rgba(0, 0, 0, 0.05);
        border-bottom-color: rgba(0, 0, 0, 0.5);
        border-right-color: rgba(0, 0, 0, 0.5);
        background: rgba(0, 0, 0, 0.25);
      }
    }

    & .lateral {
      &.left::before { display: none; }

      & .little-gap.writelock {
        height: 14%;
        transform: translate(0, 10px);
        background: rgba(0, 0, 0, 0.4);

        &::before {
          content: "";
          display: block;
          width: 100%;
          height: 50%;
          background: black;
        }

        &:active::before {
          transform: translateY(14px);
        }
      }
    }
  }
}

.created {
  background: 
    url(https://assets.codepen.io/154065/internal/avatars/users/default.png),
    linear-gradient(to bottom, #884ced, #ec1cce);
  background-size: 75px 75px, cover;
  background-repeat: no-repeat;
  position: absolute;
  top: 0;
  right: 0;
  width: 250px;
  height: 75px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-left: 2em;
  
  & span,
  & h2,
  & p,
  & a {
    font-family: Montserrat;
    margin: 0;
  }
  
  & a,
  & p,
  & span {
    color: #fff;    
  }
  
  & h2 {
    font-weight: 700;
    transform: translate(0, -4px);    
  }
  
  & a {
    text-decoration-color: rgba(255,255,255,0.4);
  }
  
  & a:hover {
    color: #e6e82a;
  }
}
              
            
!

JS

              
                /* Look mom, without JS */

              
            
!
999px

Console