octocatstartv

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.

            
              <ul class='menu circ-menu'>
  <li class='menu-item'>
    <a href='#'>☊</a>
  </li>
  <li class='menu-item selected'>
    <a href='#'>☁☀</a>
    <ul class='menu submenu'>
      <li><a href='#'>☂</a></li><!--
      --><li><a href='#'>☁</a></li><!--
      --><li><a href='#'>☃</a></li>
    </ul>
  </li>
  <li class='menu-item'>
    <a href='#'>✦</a>
  </li>
</ul>
            
          
!
            
              html {
  height: 100%;
  background: linear-gradient(90deg, violet, white);
  background-size: 2em 100%
}
.menu { padding: 0; list-style: none; }
.menu a {
  display: block;
  color: #666561;
  font: 900 2em/2.5 monospace;
  text-decoration: none;
  text-shadow: 0 1px white;
}
.circ-menu {
  overflow: hidden;
  position: relative;
  margin: 1em auto;
  padding: 5em 0 0;
  width: 20em; height: 10em;
  box-shadow: 0 .5em .5em -.5em;
}
.menu-item {
  overflow: hidden;
  position: absolute;
  z-index: 0;
  left: -50%; bottom: 0;
  width: 20em; height: 20em;
  transform-origin: 100% 100%;
}

/* === style the menu items (slices) === */

/* three slices making up half a circle mean that a slice is going to have a central_angle = 60deg */
.menu-item:first-child {
  transform: skewX(30deg) /* 90deg - central_angle */;
}
.menu-item:nth-child(2) {
  /* rotate by the value of the central angle multiplied with how many slices are before */
  transform: 
    rotate(60deg) /* 60deg = 1*central angle */
    skewX(30deg) /* 90deg - central_angle */;
}
.menu-item:last-child {
  transform: 
    rotate(120deg) /* 120deg = 2*central angle */
    skewX(30deg) /* 90deg - central_angle */;
}

/* === contents of the menu items === */
.menu-item > * {
  position: absolute;
  top: 55%; left: 55%;
  width: 90%; height: 90%;
  text-align: center;
}
.menu-item > a {
  border-radius: 50%;
  box-shadow: 0 0 0 .2em #aaa497, 
    0 0 .5em .2em black;
  transform:
    skewX(-30deg) /* unskew */
    rotate(-60deg);
  background: #f8f4ef;
  background: 
    radial-gradient(transparent 39%, #f7f3ee 40%);
}
.selected > a { z-index: 1; }
.selected > a, .menu a:hover {
  color: #e96429;
}
.selected > a, .menu-item > a:hover {
  box-shadow: 0 0 0 .2em #e96429, 
    0 0 .5em .2em black;
  background: 
    linear-gradient(60deg, #e96429 31%, rgba(247, 243, 238, 0) 33%),
    linear-gradient(-60deg, #e96429 31%, rgba(247, 243, 238, 0) 33%),
    radial-gradient(transparent 39%, #f7f3ee 40%);
  background-size: 100% 26%,  100% 26%, 100% 100%;
}

.submenu {
  z-index: 0;
  transform: 
    skewX(-30deg) /* unskew */
    rotate(-60deg)
    translateY(-5.25em);
}
.submenu li {
  display: inline-block;
  position: relative;
  border-top: solid 1px #666561;
  border-bottom: solid 1px #666561;
  width: 3.2em; height: 3.2em;
  background: #f7f3ee;
}
.submenu li:before {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: .2em;
  background: #666561;
  content: '';
}
.submenu a {
  line-height: 2
}
.submenu li:first-child {
  border-radius: .3em 0 0 .3em;
  border-left: solid 1px #666561;
}
.submenu:after {
  position: absolute;
  z-index: -1;
  top: 2.5em; left: 50%;
  margin: 0 -.6em;
  width: 1.2em; height: 1.2em;
  transform: rotate(-30deg) skewX(30deg);
  background: #666561;
  content: '';
}
.submenu li:last-child {
  border-radius: 0 .3em .3em 0;
  border-right: solid 1px #666561;
}

.circ-menu:before, .circ-menu:after {
  position: absolute;
  z-index: 1;
  bottom: -7.071em; left: 14.645%;
  width: 14.142em; height: 14.142em;
  border-radius: 50%;
  content: '';
}
.circ-menu:before {
  bottom: -5em; left: 5em;
  width: 10em; height: 10em;
  box-shadow: inset 0 0 .75em black, 
    0 0 .5em .2em #f7f3ee;
}
.circ-menu:after {
  bottom: -1em; left: 9em;
  width: 2em; height: 2em;
  box-shadow: 0 0 .4em dimgrey, 
    0 0 0 .75em #e27447, 
    0 0 .4em .75em dimgrey, 
    0 0 0 2em #f7f3ee, 
    0 0 .4em 2em dimgrey;
  background: #f7a480;
}
            
          
!
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