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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


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


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.


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.


       <title>Circle menu</title>
       <meta charset="utf-8">
       <link href="" rel="stylesheet">
        <nav class="circle-menu">
            <div class="center"></div>
                <li><a href="#" class="icon-gist-secret"><span class="segment"></span></a></li>
                <li><a href="#" class="icon-hubot"></a></li>
                <li><a href="#" class="icon-hourglass"></a></li>
                <li><a href="#" class="icon-light-bulb"></a></li>
                <li><a href="#" class="icon-squirrel"><span class="segment"></span></a></li>
                <li><a href="#" class="icon-law"></a></li>


                html, body {
    margin: 0;
    padding: 0;
    background: #f5f5f5;

.circle-menu {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 50px auto;   
    background: white;
    box-shadow: 0 0 3px #ccc;

.circle-menu ul {
    position: absolute;
    width: 300px;
    height: 300px;
    margin: 50px;
    padding: 0;
    list-style: none;
    border-radius: 50%;                                   /*  THIS IS IMPORTANT  */
    overflow: hidden;                                     /*  THIS IS IMPORTANT  */

.circle-menu .center{
    position: absolute;
    top: 195px;
    left: 195px;
    z-index: 1000;
    border: 5px solid #34495e;
    border-radius: 50%;
    box-shadow: 0 0 3px #ccc;
                         /* Make each list item right corner to center of the menu */
.circle-menu li {
    position: absolute;
    top: -10px;                                            /*  THIS IS IMPORTANT  */
    left: -10px;                                           /*  THIS IS IMPORTANT  */ 
    width: 160px;
    height: 160px;
    transform-origin: 100% 100%;                           /*  THIS IS IMPORTANT  */
    overflow: hidden;                                      /*  THIS IS IMPORTANT  */
                            /*   rotate deg = 360deg / count-of-item  (360/6=60deg);
                                 skew deg = 90deg - [rotate deg] 
                                   each li rotate deg = rotate deg * li-number;
.circle-menu li:nth-child(1) {
    transform: rotate(0deg) skew(30deg);
.circle-menu li:nth-child(2) {
     transform: rotate(60deg) skew(30deg);
.circle-menu li:nth-child(3) {
    transform: rotate(120deg) skew(30deg);
.circle-menu li:nth-child(4) {
    transform: rotate(180deg) skew(30deg);
.circle-menu li:nth-child(5) {
    transform: rotate(240deg) skew(30deg);
.circle-menu li:nth-child(6) {
    transform: rotate(300deg) skew(30deg);
                                                          /* backflip content */
.circle-menu li a{
    display: block;
    width: 160px;
    height: 160px;
    margin-top: 40px;                                     /*  THIS IS IMPORTANT  */ 
    margin-left: 40px;                                    /*  THIS IS IMPORTANT  */ 
    background: rgba(241, 196, 15, 0.5) url('monitor-4x.png') no-repeat 50% 40%;
    transform: skew(-30deg) rotate(-60deg);               /*  THIS IS IMPORTANT  */ 
    transition: background-color 0.5s;

.circle-menu li:nth-child(even) a {
    background-color: rgba(241, 196, 15, 0.75);

.circle-menu li a:hover {
    background-color: rgba(241, 196, 15, 1);

/* Icons */

[class^="icon-"]:before {
    position: absolute;
    font-size: 3em;
    bottom: 50%;
    right: 35%;
    color: rgba(240, 240, 240, 1);

/* segments */
.segment {
  display: block;
  background: blue;
  width: 300px;
  height: 300px;
  border-radius: 300px;
  position: absolute;
  bottom: -150px;
  left: -70px;
  box-sizing: border-box;
  margin-left: -3px;
  margin-bottom: 5px;
  transform: translateY(0px); /* 50% or 150px to set sement to 0 */

to move segment out of the pie you should do one of the folliwing steps:
    transform: translate(50px, 50px) rotate(240deg) skew(30deg); // move by translate
    position: fixed;
  2. (preferable way)
    ul { overflow: visible } // do not overflow li on moving outside of the pie
    ul li { margin-top: 0px; // move by margin top
    ul li a { background: none !important; }  // no background for not to see uncutted parts

to place segments correctly:
  1st segment takes 100% (translateY(0)) // 100 - 0 = 100px
  middle segment takes part which over the next segment (translateY(100px)) // 140 - 100 = 40px
  last segment represents a start segment from center of the pie translateY(140px)  // 10px