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

Packages

Add Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import or require. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <body>
  <div class="contain">
    <a href="#" class="button notificationicon on">Check Notifications</a>
  
    <ul id="notificationMenu" class="notifications">
      <li class="titlebar">
        <span class="title">Notifications</span>
        <span class="settings"><i class="icon-cog"></i>
        </span>
      </li>
      <div class="notifbox">
        <li class=" notif unread">
          <a href="#">
            <div class="imageblock"> 
              <img src="https://si0.twimg.com/profile_images/3186728694/7a0e012910e06dd1476c5edac8b9a28d_bigger.jpeg" class="notifimage"  />
            </div> 
            <div class="messageblock">
              <div class="message">This guy <strong>Jonesy</strong> has just built a tower.
              </div>
              <div class="messageinfo">
                <i class="icon-trophy"></i>2 hours ago
              </div>
            </div>
          </a>
        </li>
        <li class=" notif unread">
          <a href="#">
            <div class="imageblock">
              <img src="https://si0.twimg.com/profile_images/712543138/Self-Portrait-in-Stripes_bigger.jpg" class="notifimage"  />
            </div> 
            <div class="messageblock">
              <div class="message">
                <strong>Pete Nawara</strong> want's to drink beer with you
              </div>
              <div class="messageaction">
                <a class="button tiny success">accept</a> 
                <a class="button tiny alert">decline</a>
              </div>
              <div class="messageinfo">
                <i class="icon-flag"></i>3 hour ago
              </div>
            </div>
          </a>
        </li>
        <li class=" notif">
          <a href="#">
            <div class="imageblock"><img src="https://si0.twimg.com/profile_images/3312733808/5caeaec6d93114657c40fb257f933d28_bigger.jpeg" class="notifimage" />
            </div> 
            <div class="messageblock">
              <div class="message"><strong>Gary LaPlante</strong> has talked some trash: "<em>Buncha bitches.</em>
              </div>
              <div class="messageinfo">
                <i class="icon-comment"></i>4 hours ago
              </div>
            </div>
          </a>
        </li>
        <li class=" notif">
          <a href="#">
            <div class="imageblock"><img src="https://si0.twimg.com/profile_images/378800000168755934/c05afa029d7e42c59e7cca0ea0564a86_bigger.jpeg" class="notifimage" /></div> 
            <div class="messageblock">
              <div class="message"><strong>Jason Nawara</strong> is probably playing <strong>Smite</strong> right now.
              </div>
              <div class="messageinfo"><i class="icon-trophy"></i>Yesterday</div>
            </div>
          </a>
        </li>
        <li class=" notif">
          <a href="#">
            <div class="imageblock"><img src="https://si0.twimg.com/sticky/default_profile_images/default_profile_2_bigger.png" class="notifimage"  />
            </div> 
            <div class="messageblock">
              <div class="message"><strong>Danny DK12</strong> got a sweet fade!</div>
              
              <div class="messageinfo"><i class="icon-flag"></i>Yesterday</div>
            </div>
          </a>
        </li>
        <li class=" notif">
          <a href="#">
            <div class="imageblock"><img src="https://si0.twimg.com/profile_images/1091562021/me-small_bigger.png" class="notifimage"  /></div> 
            <div class="messageblock">
              <div class="message"><strong>Roidberg</strong> left you a comment: "<em>Hey buddy! Nice toenails!"</em></div>
              <div class="messageinfo"><i class="icon-comment"></i>2 hours ago</div>
            </div>
          </a>
        </li>
      </div>
      <li class="seeall">
        <a>See All</a>
      </li>
    </ul>
  </div>
</body>
            
          
!
            
              @hilite: #fed24d;
@hilite2: #ebb629;
@primary: #007fff;

.contain {
  width: 500px;
  margin: 0 auto;
  position: relative;
  padding: 20px;
}
.notificationicon {
  height: 44px;
  position: absolute;
  top: 20px;
  left: 170px;
  &:hover {
    background: rgba(0,0,0,.5);
    i {
    color: #fff;
    }
  }
  &.on {
    i {
    color: #ddd;
    }
  }
}
.notifications {
  max-width: 300px;
  width: 300px;
  background: #fff;
  border: 1px solid #ccc;
  padding: 0px;
  box-shadow: 0px 0px 20px #666;
  position: absolute;
  opacity:1;
  top: 65px;
  transition: .2s;
  opacity: 0;
  left: 100px;
  &:before {
    content: '';
    height: 10px;
    width: 10px;
    display: block;
    position: absolute;
    top: -20px;
    left: 140px;
    border: 10px solid #fff;
    border-color: transparent transparent #fff transparent;
  }
  &.open {
    opacity: 1;
    transition:.2s;
  }
  li {
  padding: 5px;
    list-style-type: none;
  &.titlebar {
  border-bottom: 1px solid #ccc;
  color: #666;
  font-size: 12px;
  cursor: inherit;
  padding: 2px 5px;
  &:hover {
  background: #fff;
  }
  .settings {
  float: right;
  cursor: pointer;
  }
  }
  &.seeall {
  text-align: center;
  font-size: 12px;
  min-height: 30px;
  text-transform: uppercase;
  position: relative;
  border-top: 1px solid #ccc;
  a {
  background: #f5f5f5;
  position: absolute;
  top: 0px;
  left: 0px;
  right: 0px;
  bottom: 0px;
  color: @primary;
  padding-top: 8px;
  }
  }
  }
  .notifbox {
  max-height: 300px;
  overflow: auto;
  li {
  color: #666;
  a { color: #666;}
  &.unread {
  background: lighten(@primary, 45%);
  }
  &.notif {
  min-height: 70px;
  border-bottom: 1px solid #ccc;
  position: relative;
  &:last-child {
  border-bottom: none;
  }
  .imageblock {
  width: 70px;
  position: absolute;
  left: 5px;
  .notifimage {
  height: 60px;
  }
  }
  .messageblock {
  width: 200px;
  position: relative;
  left: 70px;
  font-size: 12px;
  .message {
  a {
  color: @primary;
  }
  }
  .messageaction {
  min-height: 30px;
  margin-bottom: 5px;
  .button {
  font-weight: normal;
  text-transform: uppercase;
  &.success, &.alert {
  color: #fff;
  }
  
  }
  }
  .messageinfo {
  font-size: 10px;
  color: #999;
  }
  }
  }
  }
  }
}
.badge {
position: absolute;
top: 30px;
right: -20px;
}

            
          
!
            
              $(document).ready(function () {
  $(".notificationicon").click(function () {
    $(this).toggleClass("open");
    $("#notificationMenu").toggleClass("open");
  });
});

            
          
!
999px

Console