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="container">
  <nav class="menu">
    <ol>
      <li class="menu-item"><a href="#0">Home</a></li>
      <li class="menu-item"><a href="#0">About</a></li>
      <li class="menu-item">
        <a href="#0">Widgets <span class="triangle"></span></a>
        <ol class="sub-menu">
          <li class="menu-item"><a href="#0">Big Widgets</a></li>
          <li class="menu-item"><a href="#0">Bigger Widgets</a></li>
          <li class="menu-item"><a href="#0">Huge Widgets</a></li>
        </ol>
      </li>
      <li class="menu-item">
        <a href="#0">Kabobs <span class="triangle"></span></a>
        <ol class="sub-menu">
          <li class="menu-item"><a href="#0">Shishkabobs</a></li>
          <li class="menu-item"><a href="#0">BBQ kabobs</a></li>
          <li class="menu-item"><a href="#0">Summer kabobs</a></li>
        </ol>
      </li>
      <li class="menu-item"><a href="#0">Contact</a></li>
    </ol>
  </nav>
</div>
            
          
!
            
              @import url('https://fonts.googleapis.com/css?family=Press+Start+2P');

:root {
  --menu: linear-gradient(#1f49bc, #193990);
  --hud: url(https://i.imgur.com/XhZMI0H.png);
  --bg: url(https://i.imgur.com/5BtarPc.png);
}

a {
  font-family: 'Press Start 2P', cursive;
  text-decoration: none;
  text-shadow: 2px 2px black;
  color: white;
  display: block;
  border-radius: 3px;
  padding: 10px 15px;
  text-align: center;
  border: 2px solid transparent;
  &:hover {
    animation: menu_hover 0.45s infinite
  }
}

.triangle  {
  display: inline-block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 8px 8px;
  border-color: transparent transparent transparent #ffffff;
  filter: drop-shadow(2px -1px 0px black);
  transition: transform 0.3s;
  transform: rotate(90deg);
}

body,
html {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  background: #333333;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  width: 640px;
  height: 480px;
  background: var(--bg);
  box-shadow: 0px 5px 50px rgba(0,0,0,0.4);
}

.menu {
  background: var(--menu);
  display: inline-block;
  height: 100%;

  ol {
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 200px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 2px solid #ffffff;
    
    li {
      display: block;
      padding: 0 10px;
      position: relative;
      
      .sub-menu {
        opacity: 0;
        visibility: hidden;
        position: absolute;
        padding: 10px 0;
        border: 2px solid #ffffff;
        border-radius: 3px;
        left: calc(100% + 10px);
        top: 12px;
        height: auto;
        background: var(--menu);
        
        &:before {
          content: '';
          display: block;
          width: 35px;
          height: 60px;
          position: absolute;
          top: 0;
          left: -35px;
        }
      }
      
      &:hover {
        .triangle {
          filter: drop-shadow(1px 2px 0px black);
          transform: rotate(0);
        }
        a +.sub-menu  {
          opacity: 1;
          visibility: visible;
          top: -12px;
          height: auto;
          transition: all 0.3s;
        }
      }
    }
  }
}


@keyframes menu_hover {
  0% {
    border-color: transparent;
  }
  50% {
    border-color: white;
  }
  100% {
    border-color: transparent;
  }
}
            
          
!
999px
Loading ..................

Console