Pen Settings

HTML

CSS

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

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

              
                <ul class="menu">
  <li class="one">
    <a href="#">
      <span class="icon">icon-1</span>
    </a>
  </li>
  <li class="two">
    <a href="#">
      <span class="icon">icon-2</span>
    </a>
  </li>
  <li class="three">
    <a href="#">
      <span class="icon">icon-3</span>
    </a>
  </li>
  <li class="four">
    <a href="#">
      <span class="icon">icon-4</span>
    </a>
  </li>
  <li class="five">
    <a href="#">
      <span class="icon">icon-5</span>
    </a>
  </li>
  <li class="six">
    <a href="#">
      <span class="icon">icon-6</span>
    </a>
  </li>
</ul>

<svg height="0" width="0">
  <defs>
    <clipPath clipPathUnits="objectBoundingBox" id="sector">
      <path fill="none" stroke="#111" stroke-width="1" class="sector" d="M0.5,0.5 l0.5,0 A0.5,0.5 0 0,0 0.75,.066987298 z"></path>
    </clipPath>
  </defs>
</svg>

<p>The demo currently works best in Firefox. Pointer events are not dispatched as they should in Webkit/Blink-based browsers if you use an SVG clip path, and a CSS shape function does not work in Firefox.</p>

              
            
!

CSS

              
                @import url(//fonts.googleapis.com/css?family=Indie+Flower);

$base: #A5E2F3;

.menu {
  padding: 0;
  list-style: none;
  position: relative;
  margin: 30px auto;
  width: 70%;
  height: 0;
  padding-top: 70%;
}
@media all and (max-width: 320px) {
  .menu {
    width: 230px;
    height: 230px;
    padding: 0;
  }
}
@media all and (min-width: 700px) {
  .menu {
    width: 500px;
    height: 500px;
    padding: 0;
  }
}
.menu li { 
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  
  clip-path: url(#sector);
  /* try this one in Chrome/Opera/Safari */
  /* clip-path: polygon(50% 50%, 100% 50%, 75% 6.6%); */
  
  a {
    display: block;
    width: 100%;
    height: 100%;
  }
  
  &:hover {
    background-color: gold;
  }
}
.one {
  background-color: $base;
  transform: rotate(0deg);
}
.two {
  background-color: darken($base, 7%);
  transform: rotate(-60deg);
}
.three {
  background-color: darken($base, 14%);
  transform: rotate(-120deg);
}
.four {
  background-color: darken($base, 21%);
  transform: rotate(-180deg);
}
.five {
  background-color: darken($base, 28%);
  transform: rotate(-240deg);
}
.six {
  background-color: darken($base, 35%);
  transform: rotate(-300deg);
}

.icon {
  position: absolute;
  /* exact values here depend on what you are placing inside the items (icon, image, text, etc.) */
  right: 15%;
  top: 30%;
  /* make sure it it rotated enough; angle of rotation = angle of the sector itself */
  transform: rotate(60deg);
  
  /* style further as needed */
  color: darken($base, 60%);
  font-family: Indie Flower;
  font-size: 25px;
}

p {
  text-align: center;
  width: 80%;
  margin: 0 auto;
}
              
            
!

JS

              
                
              
            
!
999px

Console