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.

            
              <!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Sliding Menu Tiles</title>
    <link href='https://fonts.googleapis.com/css?family=Roboto:400,700|Electrolize' rel='stylesheet' type='text/css' />
  </head>
  <body>
    <div id="wrapper">
      <div id="star" class="button dialog-open">
        <i class="icon-star"></i>
      </div>
      <div id="anchor" class="button dialog-open">
        <i class="icon-anchor"></i>
      </div>
      <div id="beaker" class="button dialog-open">
        <i class="icon-beaker"></i>
      </div>
      <div id="bug" class="button dialog-open">
        <i class="icon-bug"></i>
      </div>
    </div>
    <div id="overlay">
      <div id="screen"></div>
      <div id="dialog-star" class="dialog">
        <div class="label-dialog"><i class="icon-star"></i></div>
        <div class="body-dialog">
          <p>The Star dialog is <span>modeless</span>. You can click on the check mark or anywhere outside of the dialog's body to clear it.</p>
        </div>
        <div class="ok-dialog"><i class="icon-ok-sign"></i></div>
      </div>
      <div id="dialog-anchor" class="dialog modal">
        <div class="label-dialog"><i class="icon-anchor"></i></div>
        <div class="body-dialog">
          <p>The Anchor dialog is <span>modal</span>. You must click on the check mark to acknowledge and clear it.</p>
        </div>
        <div class="ok-dialog"><i class="icon-ok-sign"></i></div>
      </div>
      <div id="dialog-beaker" class="dialog">
        <div class="label-dialog"><i class="icon-beaker"></i></div>
        <div class="body-dialog">
          <p>The Beaker dialog is <span>modeless</span>. You can click on the check mark or anywhere outside of the dialog's body to clear it.</p>
        </div>
        <div class="ok-dialog"><i class="icon-ok-sign"></i></div>
      </div>
      <div id="dialog-bug" class="dialog modal">
        <div class="label-dialog"><i class="icon-bug"></i></div>
        <div class="body-dialog">
          <p>The Bug dialog is <span>modal</span>. You must click on the check mark to acknowledge and clear it.</p>
        </div>
        <div class="ok-dialog"><i class="icon-ok-sign"></i></div>
      </div>
    </div>
  </body>
</html>
            
          
!
            
              @import "compass/css3";

/* Variable declaration */
$iconColorOne: #CCCC52;
$iconColorTwo: #52A3CC;
$iconColorThree: #52CC52;
$iconColorFour: #CC5252;

/* General styling */
* { margin: 0; padding: 0; border: 0; outline: 0; }

body {
  background: #444444 url("http://nickbrombal.com/images/bg_pixel-grey.jpg") repeat fixed;
}

#wrapper {
  margin: 0 auto;
  margin-top: 100px;
  width: 320px;
}

.button {
  float: left;
  height: 64px;
  width: 64px;
  margin: 0 8px;
  background-color: #777;
  cursor: pointer;
  box-shadow: 3px 3px #2E2E2E;
  [class^="icon-"] {
    display: inline-block;
    width: 100%;
    line-height: 64px;
    text-align: center;
    height: 64px;
    font-size: 38px;
    background: -webkit-linear-gradient(#fff, #ccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    &:before {
      display: initial;
    }
  }
}

#star { background-color: $iconColorOne; }
#anchor { background-color: $iconColorTwo; }
#beaker { background-color: $iconColorThree; }
#bug { background-color: $iconColorFour; }

/* Modal overlay styling */
#overlay {
  display: none;
  z-index: 5;
  position: fixed;
  top: 0px;
  left: 0px;
  width:100%;
  height:100%;
  #screen {
    width:100%;
    height:100%;
    background-color: #000;
    opacity: 0.5;
  }
  .dialog {
    z-index: 10;
    display: none;
    position: absolute;
    margin: auto;
    top: 0; right: 0; bottom: 0; left: 0;
    height: 100px;
    width: 500px;
    background-color: #777;
    .label-dialog {
      float: left;
      height: 100px;
      width: 100px;
      background-color: #444;
      text-align: center;
      vertical-align: top;
      [class^="icon-"] {
        line-height: 100px;
        font-size: 60px;
        color: #333;
      }
    }
    .body-dialog {
      float: left;
      height: 100px;
      line-height: 100px;
      width: 350px;
      p {
        display: inline-block;
        text-align: center;
        padding: 10px;
        font: 14px roboto;
        color: #EEE;
        vertical-align: middle;
        span { font-weight: 700; }
      }
    }
    .ok-dialog {
      float: left;
      height: 100px;
      width: 50px;
      background-color: #333;
      text-align: center;
      vertical-align: top;
      [class^="icon-"] {
        line-height: 100px;
        font-size: 30px;
        color: #EEE;
      }
      &:hover {
        background-color: #555;
        cursor: pointer;
      }
    }
  }
  
  #dialog-star {
    .label-dialog [class^="icon-"] { color: $iconColorOne; }
    .ok-dialog {
      background-color: $iconColorOne;
      &:hover { background-color: saturate($iconColorOne, 15%); }
    }
  }
  #dialog-anchor {
    .label-dialog [class^="icon-"] { color: $iconColorTwo; }
    .ok-dialog {
      background-color: $iconColorTwo;
      &:hover { background-color: saturate($iconColorTwo, 15%); }
    }
  }
  #dialog-beaker {
    .label-dialog [class^="icon-"] { color: $iconColorThree; }
    .ok-dialog {
      background-color: $iconColorThree;
      &:hover { background-color: saturate($iconColorThree, 15%); }
    }
  }
  .dialog:nth-of-type(5) {
    .label-dialog [class^="icon-"] { color: $iconColorFour; }
    .ok-dialog {
      background-color: $iconColorFour;
      &:hover { background-color: saturate($iconColorFour, 15%); }
    }
  }
}
            
          
!
            
              // Custom namespace
var modal = {};
modal.hide = function() {
  $('#overlay').fadeOut();
  $('.dialog').fadeOut();
};

$(document).ready(function() {
  // Open appropriate dialog when clicking on anything with class "dialog-open"
  $('.dialog-open').click(function() {
    modal.id = '#dialog-' + this.id;
    $('#overlay').fadeIn();
    $(modal.id).fadeIn();
  });
  // Close dialog when clicking on the "ok-dialog"
  $('.ok-dialog').click(function() {
    modal.hide();
  });
  // Require the user to click OK if the dialog is classed as "modal"
  $('#overlay').click(function() {
    if ($(modal.id).hasClass('modal')) {
      // Do nothing
    } else {
      modal.hide();
    }
  });
  // Prevent dialog closure when clicking the body of the dialog (overrides closing on clicking overlay)
  $('.dialog').click(function() {
    event.stopPropagation();
  });
});
            
          
!
999px
Loading ..................

Console