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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <h1>Circular Menu Demo</h1>
<p>
  Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perspiciatis aspernatur laboriosam dignissimos cumque recusandae quis et error, hic, impedit, doloribus dicta fugit at sunt. Mollitia vitae quaerat nostrum omnis amet!
</p>
<p>
  Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perspiciatis aspernatur laboriosam dignissimos cumque recusandae quis et error, hic, impedit, doloribus dicta fugit at sunt. Mollitia vitae quaerat nostrum omnis amet!
</p>
<p>
  Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perspiciatis aspernatur laboriosam dignissimos cumque recusandae quis et error, hic, impedit, doloribus dicta fugit at sunt. Mollitia vitae quaerat nostrum omnis amet!
</p>
<p>
  Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perspiciatis aspernatur laboriosam dignissimos cumque recusandae quis et error, hic, impedit, doloribus dicta fugit at sunt. Mollitia vitae quaerat nostrum omnis amet!
</p>
<p>
  Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perspiciatis aspernatur laboriosam dignissimos cumque recusandae quis et error, hic, impedit, doloribus dicta fugit at sunt. Mollitia vitae quaerat nostrum omnis amet!
</p>

<p>
  Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perspiciatis aspernatur laboriosam dignissimos cumque recusandae quis et error, hic, impedit, doloribus dicta fugit at sunt. Mollitia vitae quaerat nostrum omnis amet!
</p>
<p>
  Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perspiciatis aspernatur laboriosam dignissimos cumque recusandae quis et error, hic, impedit, doloribus dicta fugit at sunt. Mollitia vitae quaerat nostrum omnis amet!
</p>
<p>
  Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perspiciatis aspernatur laboriosam dignissimos cumque recusandae quis et error, hic, impedit, doloribus dicta fugit at sunt. Mollitia vitae quaerat nostrum omnis amet!
</p>
<p>
  Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perspiciatis aspernatur laboriosam dignissimos cumque recusandae quis et error, hic, impedit, doloribus dicta fugit at sunt. Mollitia vitae quaerat nostrum omnis amet!
</p>
<p>
  Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perspiciatis aspernatur laboriosam dignissimos cumque recusandae quis et error, hic, impedit, doloribus dicta fugit at sunt. Mollitia vitae quaerat nostrum omnis amet!
</p>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-100 -100 700 350" id="menu">
<style>
    #menu { display: block; margin: 0 auto; overflow: hidden; }
  .item {visibility: hidden;}
    .item .sector { transition: all .1s linear; fill: #fff; stroke: #111;  }
    .item:hover .sector { fill: #eee; }
    .menu-trigger { fill: #EA2A55; pointer-events: auto;}
    .menu-trigger:hover { cursor: pointer; }
</style>
    <g id="symbolsContainer">
        <symbol class="icon icon-" id="icon-1" viewBox="0 0 40 40"><path d="M32 18.451l-16-12.42-16 12.42v-5.064l16-12.42 16 12.42zM28 18v12h-8v-8h-8v8h-8v-12l12-9z" fill="#444444"></path></symbol>

        <symbol class="icon icon-" id="icon-2" viewBox="0 0 40 40"><path d="M34 4h-2v-2c0-1.1-0.9-2-2-2h-28c-1.1 0-2 0.9-2 2v24c0 1.1 0.9 2 2 2h2v2c0 1.1 0.9 2 2 2h28c1.1 0 2-0.9 2-2v-24c0-1.1-0.9-2-2-2zM4 6v20h-1.996c-0.001-0.001-0.003-0.002-0.004-0.004v-23.993c0.001-0.001 0.002-0.003 0.004-0.004h27.993c0.001 0.001 0.003 0.002 0.004 0.004v1.996h-24c-1.1 0-2 0.9-2 2v0zM34 29.996c-0.001 0.001-0.002 0.003-0.004 0.004h-27.993c-0.001-0.001-0.003-0.002-0.004-0.004v-23.993c0.001-0.001 0.002-0.003 0.004-0.004h27.993c0.001 0.001 0.003 0.002 0.004 0.004v23.993z" fill="#444444"></path>
            <path d="M30 11c0 1.657-1.343 3-3 3s-3-1.343-3-3 1.343-3 3-3 3 1.343 3 3z" fill="#444444"></path>
            <path d="M32 28h-24v-4l7-12 8 10h2l7-6z" fill="#444444"></path></symbol>

        <symbol class="icon icon-" id="icon-3" viewBox="0 0 40 40"><path d="M15 4c-1.583 0-3.112 0.248-4.543 0.738-1.341 0.459-2.535 1.107-3.547 1.926-1.876 1.518-2.91 3.463-2.91 5.474 0 1.125 0.315 2.217 0.935 3.247 0.646 1.073 1.622 2.056 2.821 2.842 0.951 0.624 1.592 1.623 1.761 2.748 0.028 0.187 0.051 0.375 0.068 0.564 0.085-0.079 0.169-0.16 0.254-0.244 0.754-0.751 1.771-1.166 2.823-1.166 0.167 0 0.335 0.011 0.503 0.032 0.605 0.077 1.223 0.116 1.836 0.116 1.583 0 3.112-0.248 4.543-0.738 1.341-0.459 2.535-1.107 3.547-1.926 1.876-1.518 2.91-3.463 2.91-5.474s-1.033-3.956-2.91-5.474c-1.012-0.819-2.206-1.467-3.547-1.926-1.431-0.49-2.96-0.738-4.543-0.738zM15 0v0c8.284 0 15 5.435 15 12.139s-6.716 12.139-15 12.139c-0.796 0-1.576-0.051-2.339-0.147-3.222 3.209-6.943 3.785-10.661 3.869v-0.785c2.008-0.98 3.625-2.765 3.625-4.804 0-0.285-0.022-0.564-0.063-0.837-3.392-2.225-5.562-5.625-5.562-9.434 0-6.704 6.716-12.139 15-12.139zM31.125 27.209c0 1.748 1.135 3.278 2.875 4.118v0.673c-3.223-0.072-6.181-0.566-8.973-3.316-0.661 0.083-1.337 0.126-2.027 0.126-2.983 0-5.732-0.805-7.925-2.157 4.521-0.016 8.789-1.464 12.026-4.084 1.631-1.32 2.919-2.87 3.825-4.605 0.961-1.84 1.449-3.799 1.449-5.825 0-0.326-0.014-0.651-0.039-0.974 2.268 1.873 3.664 4.426 3.664 7.24 0 3.265-1.88 6.179-4.82 8.086-0.036 0.234-0.055 0.474-0.055 0.718z" fill="#444444"></path></symbol>

        <symbol class="icon icon-" id="icon-4" viewBox="0 0 40 40"><path d="M16 4c-7.732 0-14 6.268-14 14s6.268 14 14 14 14-6.268 14-14-6.268-14-14-14zM16 29.25c-6.213 0-11.25-5.037-11.25-11.25s5.037-11.25 11.25-11.25c6.213 0 11.25 5.037 11.25 11.25s-5.037 11.25-11.25 11.25zM29.212 8.974c0.501-0.877 0.788-1.892 0.788-2.974 0-3.314-2.686-6-6-6-1.932 0-3.65 0.913-4.747 2.331 4.121 0.851 7.663 3.287 9.96 6.643v0zM12.748 2.331c-1.097-1.418-2.816-2.331-4.748-2.331-3.314 0-6 2.686-6 6 0 1.082 0.287 2.098 0.788 2.974 2.297-3.356 5.838-5.792 9.96-6.643z" fill="#444444"></path>
            <path d="M16 18v-8h-2v10h8v-2z" fill="#444444"></path></symbol>

        <symbol class="icon icon-" id="icon-5" viewBox="0 0 40 40"><path d="M26 30l6-16h-26l-6 16zM4 12l-4 18v-26h9l4 4h13v4z" fill="#444444"></path></symbol>

</g>
<g id="itemsContainer">        <a class="item" id="item-1" xlink:href="" xlink:title="" transform="matrix(1,0,0,1,0,0)" data-svg-origin="250 250" style=""><path fill="none" stroke="#111" stroke-width="1" class="sector" d="M250,250 l250,0 A250,250 0 0,0 452.25424859373686,103.05368692688171 z"></path><use xlink:href="#icon-1" width="40" height="40" x="391.6795959472656" y="177.4671173095703" transform="rotate(72 411.6795959472656 197.4671173095703)"></use></a>
        <a class="item" id="item-2" xlink:href="" xlink:title="" transform="matrix(0.80901,-0.58778,0.58778,0.80901,-99.20056166685515,194.69206447938143)" data-svg-origin="250 250" style=""><path fill="none" stroke="#111" stroke-width="1" class="sector" d="M250,250 l250,0 A250,250 0 0,0 452.25424859373686,103.05368692688171 z"></path><use xlink:href="#icon-2" width="40" height="40" x="391.6795959472656" y="177.4671173095703" transform="rotate(72 411.6795959472656 197.4671173095703)"></use></a>
        <a class="item" id="item-3" xlink:href="" xlink:title="" transform="matrix(0.30901,-0.95105,0.95105,0.30901,-65.01837766752521,410.5098804800515)" data-svg-origin="250 250" style=""><path fill="none" stroke="#111" stroke-width="1" class="sector" d="M250,250 l250,0 A250,250 0 0,0 452.25424859373686,103.05368692688171 z"></path><use xlink:href="#icon-3" width="40" height="40" x="391.6795959472656" y="177.4671173095703" transform="rotate(72 411.6795959472656 197.4671173095703)"></use></a>
        <a class="item" id="item-4" xlink:href="" xlink:title="" transform="matrix(-0.30901,-0.95105,0.95105,-0.30901,89.49011951994842,565.0183776675252)" data-svg-origin="250 250" style=""><path fill="none" stroke="#111" stroke-width="1" class="sector" d="M250,250 l250,0 A250,250 0 0,0 452.25424859373686,103.05368692688171 z"></path><use xlink:href="#icon-4" width="40" height="40" x="391.6795959472656" y="177.4671173095703" transform="rotate(72 411.6795959472656 197.4671173095703)"></use></a>
        <a class="item" id="item-5" xlink:href="" xlink:title="" transform="matrix(-0.80901,-0.58778,0.58778,-0.80901,305.3079355206185,599.2005616668552)" data-svg-origin="250 250" style=""><path fill="none" stroke="#111" stroke-width="1" class="sector" d="M250,250 l250,0 A250,250 0 0,0 452.25424859373686,103.05368692688171 z"></path><use xlink:href="#icon-5" width="40" height="40" x="391.6795959472656" y="177.4671173095703" transform="rotate(72 411.6795959472656 197.4671173095703)"></use></a>
</g>
<g id="trigger" class="trigger menu-trigger">
    <circle cx="250" cy="250" r="40"></circle>
    <text id="label" text-anchor="middle" x="250" y="247" fill="#fff" font-size="2em">+</text>
</g>
</svg>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Varela+Round|Comfortaa:400,700,300);
body {
  padding: 50px;
  background-color: #41BFB0;
  color: white;
  line-height: 1.5;
  font-family: Comfortaa;
}

h1 {
  text-align: center;
}

svg {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  max-width: 600px;
  border-radius: 125px 125px 0 0;
}
              
            
!

JS

              
                var svg = document.getElementById('menu'),
    items = svg.querySelectorAll('.item'),
    trigger = svg.getElementById('trigger'),
    label = trigger.querySelectorAll('#label')[0],
    open = false;

    //first scale the elements down
    TweenLite.set(items, {scale:0, visibility:"visible"});
svg.style.pointerEvents = "none";

    //set up event handler
    trigger.addEventListener('click', toggleMenu, false);

    //toggle menu when trigger is clicked
    function toggleMenu(event) {
     if (!event) var event = window.event;
    event.stopPropagation();
    open = !open;
    if (open) {
        TweenMax.staggerTo(items, 0.7, {scale:1, ease:Elastic.easeOut}, 0.05);
        label.innerHTML = "-";
      svg.style.pointerEvents = "auto";
    } else {
        TweenMax.staggerTo(items, .3, {scale:0, ease:Back.easeIn}, 0.05);
        label.innerHTML = "+";
      svg.style.pointerEvents = "none";
    }
    }

svg.onclick = function (e) {
    e.stopPropagation();
}
//close the nav when document is clicked
document.onclick = function () {
    open = false;
    TweenMax.staggerTo(items, .3, {scale:0, ease:Back.easeIn}, 0.05);
        label.innerHTML = "+";
    svg.style.pointerEvents = "none";
};
              
            
!
999px

Console