LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code

Page Title

Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.

Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus

CSS
body {
  font-family:sans-serif;
  font-size:12px;
  padding:30px 80px 30px 30px;
}

h2 {
  font-size:2em;
  font-weight:normal;
}

table {
  table-layout:fixed;
  width:100%;
}

td {
  border:solid 1px #ccc;
  padding:.5em;
}

td:empty:before {
  content:"101";
}

/*--------------------*/

nav {
  padding:0 10px;
  position:fixed;
  right:0;
  top:0;
  transform:rotate(90deg) translateX(100%);
  transform-origin:top right;
  z-index:1;
}

nav button {
  background-color:#fff;
  border:solid 3px #999;
  border-bottom-left-radius:5px;
  border-bottom-right-radius:5px;
  border-top:none;
  color:#999;
  font-size:16px;
  padding:5px 10px;
}

nav button:hover {
  background-color:#aaa;
  border-color:#999;
  color:#fff;
}

nav button .fa {
  margin:4px;
  transform:rotate(-90deg);
}

/* limited height */
@media screen and (max-height:450px) {
  nav button .button-label {
    display:none;
  }
}

aside {
  background-color:#eee;
  bottom:0;
  box-shadow:-5px 0 5px rgba(0,0,0,.2);
  box-sizing:border-box;
  max-width:640px;
  min-width:300px;
  padding:30px 80px 30px 30px;
  position:fixed;
  right:-100%;
  top:0;
  transition:all 1s ease-in-out;
}

aside.fly-in {
  right:0;
}

aside .close {
  color:#999;
  cursor:pointer;
  font-size:1.5em;
  position:absolute;
  right:80px;
  top:30px;
}

aside .close:hover {
  color:#000;
}

aside h3 {
  font-size:1.5em;
  font-weight:normal;
  margin-top:0;
}
JS
// click button to toggle panel
$('nav').on('click', 'button', function() {
  var i = $(this).index();
  $('aside:not(:eq(' + i + '))').removeClass('fly-in');
  $('aside:eq(' + i + ')').toggleClass('fly-in');
});

// click cross to close panel
$('aside').on('click', '.close', function() {
  $(this).closest('aside').removeClass('fly-in');
});

// click off panel or buttons to close panel
$(document).on('click', function(e) {
  if (!$(e.target).closest('aside').length && !$(e.target).closest('nav').length) {
    $('aside').removeClass('fly-in');
  }
});

Description

Curiously like the Codepen buttons...
Term
Wed, 12/27/2017 - 07:01

Related Codes

Pen ID
Pen ID
Pen ID
Square Adv