Advertisement
gsmashik

Tab Like Chrome

Jul 2nd, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 4.76 KB | None | 0 0
  1.  .tab-container {
  2.   background: #8dc8fb;
  3.   margin: 0;
  4.   padding: 0;
  5.   max-height: 40px;
  6. }
  7.  
  8. .tab-container ul.nav-tabs {
  9.   margin: 0;
  10.   list-style-type: none;
  11.   line-height: 40px;
  12.   max-height: 40px;
  13.   overflow: hidden;
  14.   display: inline-block;
  15.   display: -webkit-flex;
  16.   display: flex;
  17.   padding-right: 20px;
  18.   border-bottom: 5px solid #f7f7f7;
  19. }
  20.  
  21. .tab-container ul.nav-tabs > li {
  22.   margin: 5px -14px 0;
  23.   -moz-border-radius-topleft: 28px 145px;
  24.   -webkit-border-top-left-radius: 28px 145px;
  25.   border-top-left-radius: 28px 145px;
  26.   -moz-border-radius-topright: 28px 145px;
  27.   -webkit-border-top-right-radius: 28px 145px;
  28.   border-top-right-radius: 28px 145px;
  29.   padding: 0 30px 0 25px;
  30.   height: 170px;
  31.   background: #c3d5e6;
  32.   position: relative;
  33.   -moz-box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
  34.   -webkit-box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
  35.   box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
  36.   width: 200px;
  37.   max-width: 200px;
  38.   min-width: 20px;
  39.   border: 1px solid #aaa;
  40. }
  41.  
  42. .tab-container ul.nav-tabs > li:first-child {
  43.   margin-left: 0;
  44. }
  45.  
  46. .tab-container ul.nav-tabs > li:last-of-type {
  47.   margin-right: 0;
  48. }
  49.  
  50. .tab-container ul.nav-tabs > li > a {
  51.   display: block;
  52.   max-width: 100%;
  53.   text-decoration: none;
  54.   color: #222;
  55.   padding: 3px 7px;
  56. }
  57.  
  58. .tab-container ul.nav-tabs > li > a span {
  59.   overflow: hidden;
  60.   white-space: nowrap;
  61.   display: block;
  62. }
  63.  
  64. .tab-container ul.nav-tabs > li > a:focus,
  65. .tab-container ul.nav-tabs > li > a:hover {
  66.   background-color: transparent;
  67.   border-color: transparent;
  68. }
  69.  
  70. .tab-container ul.nav-tabs > li > a .glyphicon-remove {
  71.   color: #777;
  72.   display: inline-block;
  73.   padding: 3px;
  74.   font-size: 10px;
  75.   position: absolute;
  76.   z-index: 10;
  77.   top: 7px;
  78.   right: -10px;
  79.   -moz-border-radius: 50%;
  80.   -webkit-border-radius: 50%;
  81.   border-radius: 50%;
  82. }
  83.  
  84. .tab-container ul.nav-tabs > li > a .glyphicon-remove:hover {
  85.   background: #d39ea3;
  86.   color: white;
  87.   -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.25);
  88.   -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.25);
  89.   box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.25);
  90.   text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
  91. }
  92.  
  93. .tab-container ul.nav-tabs > li.active {
  94.   z-index: 2;
  95.   background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2Y3ZjdmNyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
  96.   background-size: 100%;
  97.   background-image: -webkit-gradient(linear, 50% 0%, 50% 30, color-stop(0%, #ffffff), color-stop(100%, #f7f7f7));
  98.   background-image: -moz-linear-gradient(#ffffff, #f7f7f7 30px);
  99.   background-image: -webkit-linear-gradient(#ffffff, #f7f7f7 30px);
  100.   background-image: linear-gradient(#ffffff, #f7f7f7 30px);
  101. }
  102.  
  103. .tab-container ul.nav-tabs > li.active > a {
  104.   background-color: transparent;
  105.   border-color: transparent;
  106.   border-bottom-color: transparent;
  107. }
  108.  
  109. .tab-container ul.nav-tabs > li.active > a:focus,
  110. .tab-container ul.nav-tabs > li.active > a:hover {
  111.   background-color: transparent;
  112.   border-color: transparent;
  113.   border-bottom-color: transparent;
  114. }
  115.  
  116. .tab-container ul.nav-tabs .btn {
  117.   float: left;
  118.   height: 20px;
  119.   width: 35px;
  120.   min-width: 35px;
  121.   max-width: 35px;
  122.   margin: 10px 0 0 0;
  123.   border-color: #71a0c9;
  124.   outline: none;
  125.   -moz-transform: skew(30deg);
  126.   -ms-transform: skew(30deg);
  127.   -webkit-transform: skew(30deg);
  128.   transform: skew(30deg);
  129. }
  130.  
  131. .tab-container ul.nav-tabs .btn.btn-default {
  132.   background: #c3d5e6;
  133. }
  134.  
  135. .tab-container ul.nav-tabs .btn.btn-default:hover {
  136.   background: #d2deeb;
  137. }
  138.  
  139. .tab-container ul.nav-tabs .btn.btn-default:active {
  140.   background: #9cb5cc;
  141. }
  142.  
  143. .tab-container .tab-pane {
  144.   padding: 60px 40px;
  145.   text-align: center;
  146. }
  147.  
  148. .tab-container .tab-pane.active {
  149.   border-top: 1px solid #ddd;
  150. }
  151.  
  152.  
  153.  <ul class="nav nav-tabs" id="myTab">
  154.     <li class="active"><a data-target="#home" data-toggle="tab">Home</a></li>
  155.     <li><a data-target="#profile" data-toggle="tab">Profile</a></li>
  156.     <li><a data-target="#messages" data-toggle="tab">Messages</a></li>
  157.     <li><a data-target="#settings" data-toggle="tab">Settings</a></li>
  158.     <button class="btn btn-default"></button>
  159.   </ul>
  160.  
  161.   <div class="tab-content">
  162.     <div class="tab-pane active" id="home">Home</div>
  163.     <div class="tab-pane" id="profile">Profile</div>
  164.     <div class="tab-pane" id="messages">Message</div>
  165.     <div class="tab-pane" id="settings">Settings</div>
  166.   </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement