Lorky

Discontinued navbar | CSS

Dec 26th, 2022
2,791
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 1.97 KB | Source Code | 0 0
  1. .nav-bar {
  2.     display: flex;
  3.     flex-direction: column;
  4.     align-items: center;
  5.     position: absolute;
  6.     top: 50%;
  7.     left: 0;
  8.     transform: translateY(-70%);
  9.     background-color: rgba(255, 255, 255, 0.288);
  10.     border-radius: 0 10px 10px 0;
  11.     color: #fff;
  12.     padding: 10px;
  13.     animation: navanim 0.7s ease-out;
  14.    
  15.   }
  16.  
  17.   @keyframes navanim {
  18.     from {
  19.       transform: translateX(-100%);
  20.       transform: translateY(0%);
  21.       opacity: 0;
  22.     }
  23.     to {
  24.       transform: translateX(0);
  25.       transform: translateY(-70%);
  26.       opacity: 1;
  27.     }
  28.   }
  29.  
  30.   .nav-btn:hover .text-bar {
  31.     display:block;
  32.   }
  33.  
  34.  
  35.   .nav-bar button {
  36.     background-color: transparent;
  37.     border: none;
  38.     transition: transform 0.35s ease-out;
  39.     color: #fff;
  40.     font-size: 20px;
  41.     cursor: pointer;
  42.     outline: none;
  43.     padding: 10px;
  44.     width: 100%;
  45.     text-align: left;
  46.    
  47.   }
  48.  
  49.   button:hover {
  50.     transform: scale(1.1);
  51.    
  52.   }
  53.  
  54.   .nav-bar button:hover {
  55.     background-color: rgba(255, 255, 255, 0.089);;
  56.   }
  57.  
  58.   .nav-btn .text {
  59.     display: none;
  60.     padding: 25px;
  61.     width: 120%;
  62.    
  63.     position: static;
  64.     animation: textAnimation 0.5s ease-out;
  65.    
  66.   }
  67.  
  68.  
  69.  
  70.   @keyframes textAnimation {
  71.     from {
  72.       opacity: 0;
  73.     }
  74.     to {
  75.       opacity: 1;
  76.     }
  77.   }
  78.  
  79.   .nav-bar ul {
  80.     list-style: none;
  81.   justify-content: flex-start;
  82.  
  83.   margin-left: -30px;
  84.   }
  85.  
  86.   .nav-btn .emoji {
  87.     width: 30px;
  88.     text-align: left;
  89.     display: inline-block;
  90.     margin-left: 0px;
  91.     animation: emoAnimation 3s ;
  92.   }
  93.  
  94.   @keyframes emoAnimation {
  95.     from {
  96.       transform: translateX(-200%);
  97.      
  98.       opacity: 0;
  99.     }
  100.     to {
  101.       transform: translateX(0);
  102.       opacity: 1;
  103.     }
  104.   }
  105.  
  106.   section {
  107.     display: none;
  108.   }
  109.  
  110.   section.active {
  111.     display: block;
  112.   }
  113.  
  114.   section {
  115.     margin-bottom: 20px;
  116.   }
  117.  
  118.   section h2 {
  119.     font-size: 1.5em;
  120.     margin-bottom: 10px;
  121.   }
Advertisement
Add Comment
Please, Sign In to add comment