<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Tab Bar Animation CSS Only
</title>
</head>
<body>
  <h1 style="color: white">😎 Tab Bar Animation CSS Only</h1>
  <!--   With Icons -->
  <div class="tab-bar">
    <a class="tab" href="#" data-text="Home">
      <span class="icon"><img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjwhRE9DVFlQRSBzdmcgIFBVQkxJQyAnLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4nICAnaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkJz48c3ZnIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDQ4IDQ4IiBoZWlnaHQ9IjQ4cHgiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDQ4IDQ4IiB3aWR0aD0iNDhweCIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGcgaWQ9IkV4cGFuZGVkIj48Zz48Zz48cGF0aCBkPSJNNDIsNDhIMjhWMzVoLTh2MTNINlYyN2MwLTAuNTUyLDAuNDQ3LTEsMS0xczEsMC40NDgsMSwxdjE5aDEwVjMzaDEydjEzaDEwVjI4YzAtMC41NTIsMC40NDctMSwxLTFzMSwwLjQ0OCwxLDFWNDh6Ii8+PC9nPjxnPjxwYXRoIGQ9Ik00NywyN2MtMC4yNDksMC0wLjQ5Ny0wLjA5Mi0wLjY5MS0wLjI3N0wyNCw1LjM4NEwxLjY5MSwyNi43MjNjLTAuMzk5LDAuMzgxLTEuMDMyLDAuMzY4LTEuNDE0LTAuMDMxICAgICBjLTAuMzgyLTAuMzk5LTAuMzY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LjU3OS0xMC41ICAgICBsMS40NC0xLjM4N2M0LjY5NSw0Ljg3NCwzLjY2MSwxMC4xOTIsMC41NTIsMTMuMzAxTDI0LDQ1LjIxNEMyMi4zMjIsNDYuODkyLDIwLjA0Miw0Ny44NTIsMTcuNzM2LDQ3Ljg1MnoiLz48L2c+PGc+PHBhdGggZD0iTTQuMDYxLDM3LjYwMWMtMC4yNiwwLTAuNTE5LTAuMTAxLTAuNzE1LTAuMzAxYy00LjcwOC00LjgxMy0zLjU4OS0xMC4yNjktMC41NTktMTMuMjk5TDI0LjAwMSwyLjc4NyAgICAgYzMuNzA4LTMuNzA3LDguNjg1LTMuNTE5LDEzLjMxMiwwLjUwNWMwLjQxNywwLjM2MiwwLjQ2MSwwLjk5NCwwLjA5OSwxLjQxMXMtMC45OTQsMC40NTktMS40MTEsMC4wOTkgICAgIGMtMy44MDItMy4zMDctNy42NjEtMy41MjUtMTAuNTg2LTAuNjAxTDQuMjAxLDI1LjQxNWMtMi40MzYsMi40MzctMy4yMDMsNi42MjMsMC41NzQsMTAuNDg2ICAgICBjMC4zODYsMC4zOTUsMC4zNzksMS4wMjgtMC4wMTYsMS40MTRDNC41NjUsMzcuNTA2LDQuMzEzLDM3LjYwMSw0LjA2MSwzNy42MDF6Ii8+PC9nPjwvZz48L2c+PC9zdmc+" alt=""></span>
    </a>
    <a class="tab" href="#" data-text='Extra'>
      <span class="icon"><img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjwhRE9DVFlQRSBzdmcgIFBVQkxJQyAnLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4nICAnaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkJz48c3ZnIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDQ4IDQ4IiBoZWlnaHQ9IjQ4cHgiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDQ4IDQ4IiB3aWR0a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C45ODItMS45ODJsMS4zOTMtMS40MzZjMC42MDQsMC41ODcsNC4wMzUsMS45OTQsNy4yNTQsMS40NDYgICAgIGMxLjk5OC0wLjMzOSwzLjQzOC0xLjM2Niw0LjI4LTMuMDUxbDAuODM2LTEuNjcxbDAuOTI3LDEuNjIyYzEuMTA3LDEuOTM4LDMuNzYzLDMuNjM3LDUuOCwzLjcxMiAgICAgYzAuOTA2LDAuMDI0LDEuNTUtMC4yNDcsMS45NjEtMC44NTdsMS42NTksMS4xMTdDMzUuNTI4LDEyLjYwNCwzNC4yOTUsMTMuMjE4LDMyLjc5OSwxMy4yMTh6Ii8+PC9nPjwvZz48L2c+PC9zdmc+" alt=""></span>
    </a>
  </div>
  
  <!--   With Alphabets -->
  <div class="tab-bar">
    <a class="tab" href="#" data-text="Home">
      <span class="icon">A</span>
    </a>
    <a class="tab" href="#" data-text="Like">
      <span class="icon">B</span>
    </a>
    <a class="tab" href="#" data-text="Extra">
      <span class="icon">C</span>
    </a>
    <a class="tab" href="#" data-text='Extra'>
      <span class="icon">D</span>
    </a>
  </div>
  <div class="tab-bar radius">
    <a class="tab" href="#" data-text="Home">
      <span class="icon">A</span>
    </a>
    <a class="tab" href="#" data-text="Like">
      <span class="icon">B</span>
    </a>
    <a class="tab selected" href="#" data-text="Extra">
      <span class="icon">C</span>
    </a>
    <a class="tab" href="#" data-text='Extra'>
      <span class="icon">D</span>
    </a>
  </div>
  <div class="tab-bar radius border">
    <a class="tab" href="#" data-text="Home">
      <span class="icon">A</span>
    </a>
    <a class="tab" href="#" data-text="Like">
      <span class="icon">B</span>
    </a>
    <a class="tab" href="#" data-text="Extra">
      <span class="icon">C</span>
    </a>
    <a class="tab" href="#" data-text='Extra'>
      <span class="icon">D</span>
    </a>
  </div>
</body>
</html>
@import url('https://fonts.googleapis.com/css?family=Quicksand&display=swap');

body, html {
  font-family: 'Quicksand', sans-serif;
  background: #5fef8d;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;   
}

$font-size: 12px;
$time: 0.3s;
$border: 1px;
$border-radius: 5px;
$border-color: #5fef8d;
$chip-color: #607D8B;
$morph-chip-color: #5fef8d;
$selected-bg: rgba(0,0,0,0.1);

@mixin border() {
  border: $border solid $border-color;
  border-right: none;
  &:last-child {
    border-right: $border solid $border-color;
    border-top-right-radius: inherit;
    border-bottom-right-radius: inherit;
  }
  &:first-child {
    border-top-left-radius: inherit;
    border-bottom-left-radius: inherit;
  }
  
}
.radius {
  border-radius: $border-radius;
  
  .tab:active::before {
      border-radius: $border-radius !important;
  }
}

.border .tab {
 @include border();
 &:active::before {
      border-radius: inherit !important;
  }
}

.tab-bar {
  background-color: white;
  padding: 5px;
  box-shadow: 1px 4px 20px rgba(0,0,0,0.2);
  display: flex;
  margin: 10px;
  color: black;
  
  .tab {
    box-sizing: border-box;
    text-decoration: none;
    color: inherit;
    width: 70px;
    height: 70px;
    background: inherit;
    padding: 5px;
    display: inherit;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: all $time;
    
    &::before {
      position: absolute;
      content: "";
      width: 26%;
      height: 13%;
      border-top-left-radius: 200px;
      border-top-right-radius: 200px;
      border-bottom: none;
      background-color: $chip-color;
      bottom: -8px;
      opacity: 0;
      transition: all $time ease-in-out;
    }
    
    &:active::before {
      width: 100%;
      height: 100%;
      background-color: $morph-chip-color;
      border-radius: 0;
    }
    
    &:hover::before {
      opacity: 1;
      bottom: 0px;
    }
    
    &::after {
      content: attr(data-text);
      position: absolute;
      top: 0;
      width: 100%;
      text-align: center;
      color: inherit;
      font-size: $font-size;
      opacity: 0;
      transition: all $time ease-in-out;
    }
    
    &:hover {
      &::after {
        opacity: 1;
        top: 6px;
      }
      padding-top: 15px;
    }
    
    &.selected {
      background-color: $selected-bg;
      border-radius: inherit;
      
      &::after {
        opacity: 1;
        top: 6px;
      }
      &::before {
        opacity: 1;
        bottom: 0px;
      }
      padding-top: 15px;
    }
    
    
    .icon {
      color: inherit;
      z-index: 10;
      font-size: 2*$font-size;
      display: inherit;
      
      img {
        margin: auto;
        height: 2*$font-size;
      }
    }
  }
}
View Compiled
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.