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 CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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.

            
              <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Josefin+Sans" rel="stylesheet">
<script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://use.fontawesome.com/aa95071b26.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

<div id="body">
  <div class="out-wrap">
  <ul id="tabs" class="nav nav-tabs" role="tablist">
    <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">Home</a></li>
    <li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">Profile</a></li>
    <li role="presentation"><a href="#messages" aria-controls="messages" role="tab" data-toggle="tab">Messages</a></li>
    <li role="presentation"><a href="#settings" aria-controls="settings" role="tab" data-toggle="tab">Settings</a></li>
    <li role="presentation"><a href="#about" aria-controls="about" role="tab" data-toggle="tab">About</a></li>
    <li role="presentation"><a href="#foryou" aria-controls="foryou" role="tab" data-toggle="tab">For You</a></li>
  </ul>

  <div class="tab-content">
    <div role="tabpanel" class="tab-pane active" id="home">Lorem ipsum dolor sit amet, id pede etiam, ultricies nunc torquent luctus, vel vivamus, pede est interdum lectus ligula sit, vel egestas volutpat aptent aliquam. Sed luctus egestas. Placerat turpis rutrum maecenas, sodales viverra ab, purus consectetuer ut tincidunt lobortis massa. Sit vel, duis mi metus et felis egestas, dis integer vitae, feugiat consectetuer elit, natoque lacus leo volutpat donec quam bibendum. Felis mauris.</div>
    <div role="tabpanel" class="tab-pane" id="profile">Nulla ipsum elit, eleifend sed. Fermentum sit, consequat commodo vel massa integer in wisi, quam libero, mollis tortor dapibus porttitor, euismod nonummy duis et rutrum et nibh. Ullamcorper in at, justo eu amet id sed, vel amet ut et velit velit, suscipit ultricies. Lectus quis proin sodales. Eu donec etiam vestibulum id lectus nascetur, mauris amet pellentesque posuere sit vitae, dolor consectetur nec varius, vitae sed quis dolor commodo lacus. Rhoncus platea risus omnis aenean, rhoncus nibh eget turpis eros enim, magna vestibulum enim minima habitant malesuada porttitor, nibh donec magna lorem nunc vitae.</div>
    <div role="tabpanel" class="tab-pane" id="messages">Diam vulputate interdum ac et eget, et interdum proin, nec aliquet a. Vitae lobortis elit morbi, pede mi nullam lacus magna consectetuer lobortis, hendrerit amet nulla et rutrum, et per a in, integer lectus nunc ac dignissim sit. Vestibulum dignissim placerat, sed arcu vitae, quis hac ultrices at, fringilla nullam ut. Tempor cursus quam sit, tempus iaculis enim dolor. Platea pede nullam quis, urna aut tellus est, nibh feugiat tristique metus nec viverra vestibulum, nulla et ut mauris dui. Neque tortor tristique, volutpat velit et. Ipsum sit tellus eos, morbi scelerisque suspendisse, luctus in animi nam diam, fusce metus morbi. Pretium lacus a phasellus, donec pede duis eget vestibulum in. Vivamus ac nullam feugiat quaerat pharetra.</div>
    <div role="tabpanel" class="tab-pane" id="settings">Elit in gravida a sem pellentesque sodales, cursus turpis turpis, vitae nec urna. Feugiat id ultricies interdum metus, felis wisi, ornare wisi orci proin amet lacinia adipiscing. Sollicitudin donec quis libero sit, euismod lorem ornare ante lacus hendrerit vitae, parturient aliquet pellentesque quam eu, eu hendrerit rhoncus odio, urna etiam ut purus. Nonummy elit ultricies saepe adipiscing nam quam, magna dis, molestie risus metus pretium nunc, et cras tempus dignissim duis arcu nec, mauris laboriosam suspendisse. In mi vivamus, tempor sit sed congue. A vehicula vel nulla hendrerit bibendum, metus pretium curabitur elementum at, pede congue sodales risus rutrum sed, vel imperdiet suspendisse recusandae conubia.</div>
    
        <div role="tabpanel" class="tab-pane" id="about">itae, parturient aliquet pellentesque quam eu, eu hendrerit rhoncus odio, urna etiam ut purus. Nonummy elit ultricies saepe adipiscing nam quam, magna dis, molestie risus metus pretium nunc, et cras tempus dignissim duis arcu nec, mauris laboriosam suspendisse. In mi vivamus, tempor sit sed congue. A vehicula vel nulla hendrerit bibendu.</div>
    
    <div role="tabpanel" class="tab-pane" id="foryou">Terdum proin, nec aliquet a. Vitae lobortis elit morbi, pede mi nullam lacus magna consectetuer lobortis, hendrerit amet nulla et rutrum, et per a in, integer lectus nunc ac dignissim sit. Vestibulum dignissim placerat, sed arcu vitae, quis hac ultrices at, fringilla nullam ut. Tempor cursus quam sit, tempus iaculis enim dolor. Platea pede nullam quis, urna aut tellus est, nibh feugiat tristique metus nec viverra vestibulum, nulla et ut mauris dui. Neque tortor tristique, volutpat velit et. Ipsum sit tellus eos, morbi scelerisque suspendisse, luctus in animi nam diam, fusce metus morbi. Pretium lacus a phasellus, donec pede duis eget vestibulum ac.</div>
  </div>
  </div>
</div>
            
          
!
            
              // Extra small screen / phone
$screen-xs-min: 480px;

// Small screen / tablet
$screen-sm-min: 768px;

// Medium screen / desktop
$screen-md-min: 992px;

// Large screen / wide desktop
$screen-lg-min: 1200px;

// So media queries don't overlap when required, provide a maximum
$screen-xs-max: ($screen-sm-min - 1);
$screen-sm-max: ($screen-md-min - 1);
$screen-md-max: ($screen-lg-min - 1);

@mixin respondTo($media) {
  @if $media == "xs" {
    @media only screen and (max-width: $screen-xs-max) {
      @content;
    }
  }

  @else if $media == "sm" {
    @media only screen and (max-width: $screen-sm-max) and (min-width: $screen-sm-min) {
      @content;
    }
  }

  @else if $media == "md" {
    @media only screen and (max-width: $screen-md-max) and (min-width: $screen-md-min) {
      @content;
    }
  }

  @else if $media == "lg" {
    @media only screen and (min-width: $screen-lg-min) {
      @content;
    }
  }
}
@mixin respondToAbove($media) {
  @if $media == "xs" {
    @media only screen and (min-width: $screen-xs-max) {
      @content;
    }
  }

  @else if $media == "sm" {
    @media only screen and (min-width: $screen-sm-min) {
      @content;
    }
  }

  @else if $media == "md" {
    @media only screen and (min-width: $screen-md-min) {
      @content;
    }
  }

  @else if $media == "lg" {
    @media only screen and (min-width: $screen-lg-min) {
      @content;
    }
  }
}
@mixin respondToBelow($media) {
  @if $media == "xs" {
    @media only screen and (max-width: $screen-xs-max) {
      @content;
    }
  }

  @else if $media == "sm" {
    @media only screen and (max-width: $screen-sm-max) {
      @content;
    }
  }

  @else if $media == "md" {
    @media only screen and (max-width: $screen-md-max) {
      @content;
    }
  }

  @else if $media == "lg" {
    @media only screen {
      @content;
    }
  }
}
@mixin respondToTablet {
  @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max){
    @content;
  }
}
@mixin respondToSmall-n-Medium {
  @media (min-width: $screen-sm-min) and (max-width: $screen-md-max){
    @content;
  }
}
@mixin respondToMobile() {
  @include respondTo(xs){
    @content
      }
}
@mixin respondToDesktop() {
  @include respondToAbove(md){
    @content
      }
}

@mixin close-icon{
  font-size: 0 !important;
  position: absolute;
  height: 40px;
  width: 40px;
  right: 20px;
  top: 20px;   
  font-size: 0px;
  cursor: pointer;
  z-index: 9;
  border: 0;
  background: transparent;
  &:before,&:after{
    content: '';
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    margin: auto;
    position: absolute;
    height: 2px;
    background: #fff;
    width: 50%;
    transition: all .25s;
    opacity: 0;
  }
  &:before{
    transform: rotate(45deg);
    opacity: 1;
  }
  &:after{
    transform: rotate(-45deg);
    opacity: 1;
  }
}
@mixin radio-button{
  display: none;
  & + *{
    position: relative;
    padding-left: 30px;
    margin-left: 10px;
    &:before{
      content: '';
      width: 20px;
      @include rounded_corners(50%);
      height: 20px;
      @include box-shadow(inset 0px 1px 5px rgba(0,0,0,0.5));
      text-indent: 30px;
      left: 0;
      top: 0;
      position: absolute;
      cursor: pointer;
    }
    &:after {
      content: '';
      width: 20px;
      height: 20px;
      cursor: pointer;
      position: absolute;
      z-index: 1;
      background: $dbc;
      @include rounded_corners(50%);
      @include transition(all .25s);
      top: 0;
      left: 0;
      @include transform(scale(0));
    }
  }
  &:checked + *:after {
    @include transform(scale(.4));
    @include transition(all .25s cubic-bezier(0.68,0.55,0.265,3));
  }
}
@mixin check-box{
  display: none;
  & + *{
    position: relative;
    padding-left: 30px;
    margin-left: 10px;
    &:before{
      content: '';
      width: 18px;
      height: 18px;
      @include box-shadow(inset 0px 1px 5px rgba(0,0,0,0.5));
      text-indent: 30px;
      left: 0;
      top: 0;
      position: absolute;
      cursor: pointer;
    }
    &:after {
      content: '';
      width: 25px;
      height: 15px;
      cursor: pointer;
      position: absolute;
      z-index: 1;            
      border: solid $solid-color;
      border-width: 0 0 7px 7px;
      top: 0;
      left: -3px;
      @include transform(rotate(0deg) scale(0));
      @include transition(all .25s);
    }
  }
  &:checked + *:after {
    @include transform(rotate(-45deg) scale(0.4));
    @include transition(all .25s cubic-bezier(0.68,0.55,0.265,3));
  }
  &:checked + *:before {
    background: $dbc;
  }
}

@mixin calwidth($val1, $val2){
  width: calc(#{$val1} + #{$val2})
}

@mixin transition-hvr($t-duration, $t-type){
  position: relative;
  transition: all $t-duration $t-type;
  &:before,&:after{       
    content:'';
    position: absolute;
    left: 0;
    top: 0;
    width:0;
    height:0;
    transition: width $t-duration ($t-duration*3) $t-type, height $t-duration ($t-duration*2) $t-type, border ($t-duration/5) ($t-duration*4) $t-type;
    border: solid transparent;
    border-width: 3px 3px 0 0;
  }
  &:after{
    left: auto;
    top: auto;
    bottom: 0;
    right: 0;
    transition: width  $t-duration $t-duration $t-type, height $t-duration $t-type, border ($t-duration/5) ($t-duration*2) $t-type;
    border-width: 0 0 3px 3px;
  }
  &:hover{
    &:before,&:after{
      transition: width $t-duration $t-type, height $t-duration $t-duration $t-type, border ($t-duration/5) $t-type;
      width: 100%;
      height: 100%;         
      border-color: $dbc;
    }
    &:after{
      transition: width $t-duration ($t-duration*2) $t-type, height $t-duration ($t-duration*3)  $t-type, border ($t-duration/5) ($t-duration*2) $t-type;       
    }
  }
}
$shadow : 0 6px 10px -2px rgba(0, 0, 0, .25);
$solid: #ffc107;
$dbc: #3D5A68;
#body {
  @include respondToAbove(sm){
  padding: 1px;
  }
      @include respondTo(xs){
  padding: 1px;
  }
  background: $dbc;
  min-height: 150vh;
  font-family: 'Josefin Sans', sans-serif;
  text-transform: captalize;
  letter-spacing: 2px;
  &, & *{
    transition: all .25s;
  }
  .out-wrap {
        position: relative;
        padding: 30px;
        box-shadow: 0 6px 10px -2px rgba(0, 0, 0, .25);
        width: 400px;
        margin: 50px auto;
        background: $solid;
    #tabs{
      border-bottom: 0;
      margin: 0 -50px 20px;
      background: #303030;
        display: flex;
        overflow-x: scroll;
    overflow-y: hidden;
      box-shadow: 0 0 10px rgba(0,0,0,.5);
    flex-wrap: nowrap !important;
        &::-webkit-scrollbar{
          display: none;
        }
        li{
              width: auto;
    white-space: nowrap;
    flex: 1 ;
          a{
            border: 0;
            border-radius: 0;
            cursor: pointer;
            margin:0;
          color: #fff;
            text-transform: uppercase;
            &:hover{
              
            background: #ddd;
              color: #303030;
            }
        }
          &.active {
            a{              
            background: #fff;
              color: $dbc;
            }
          }
      }
      }
    .tab-content{
      overflow: hidden !important;
    }
    }
}

            
          
!
            
              $.fn.tabbing = function (options) {
    var opts = {delayTime : 300};
    options = options || {};
    opts = $.extend(opts,options);    
    return this.each(function () {
        $(this).on('click', function (event) {
            event.preventDefault();
            var sum = 0;
            $(this).prevAll().each(function(){  sum += $(this).width();});
          var get = document.getElementById('tabs').scrollWidth
            var dist = sum - ( $(this).parent().width() - $(this).width()) / 2;
          if(dist < 0){
            dist = 0;
          }
          /* else if(dist+sum > get){
            dist = get-sum+dist+dist;
          } */
            $(this).parent().animate({
                scrollLeft: dist
            },opts['delayTime']);
        });
    });
};
$('#tabs li').tabbing();


$('#tabs li').click(function(){
  var  hashit = $(this).find('a').attr('href')
  var autoHeight = $(hashit).height() + 30;
$('.tab-content').animate({height: autoHeight}, 100);
});
            
          
!
999px
Loading ..................

Console