<div id="app" class="container"></div>

@import 'https://fonts.googleapis.com/css?family=Share+Tech+Mono';

@import 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css';

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
    width: 100vw;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/1376484/jess-harding-lqT6NAmTaiY-unsplash.jpg'),radial-gradient(#28a3dd, #0d7751);
    background-size: cover;
    background-position: center;
    font-family: "Share Tech Mono", monospace;
    font-size: 2rem;
    background-blend-mode: multiply,screen, overlay;
}

.container {
    position: relative;
    background-size: cover;
    background-position: center;
    backdrop-filter: blur(20px);
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 5px;
    padding:2vw;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    transition: .3s ease;
    margin: 3vw;
}

.nav {
  min-width: 40vw;
  list-style: none inside none;
  border-radius: 4px;
  background: #2a394f;
  
  li:first-child a {
    border-radius: 4px 4px 0 0; 
  }
  
  li:last-child a {
    border-radius: 0 0 4px 4px;
  }
  
  a {
    display: flex;
    align-items: center;
    padding: 3vh 6vh;
    border-bottom: 1px solid #293649;
    position: relative;
    width: 100%;
    color: #eff4fa;
    text-decoration: none;
    text-shadow: .05em .05em .01em rgba(0,0,0,.5);
    position: relative;
    transition: all .2s ease;
    font-size: 5vh;
    
    
    &::after {
      content: '';
      position: absolute;
      left: 0;
      bottom: 0;
      width: 0px;
      transition: width .15s;
      height: 2px;
      position: absolute;
      display: block;
      background: #355789;
      bottom: 0;
      left: 0;
    }
    
    &::before {
      content: '';
      display: inline-block;
      font-family: FontAwesome;
      margin-right: 10px;
      min-width: 8vh;
      text-align: center;
    }
    
    &:hover {
      background: #212e41;
      border-bottom: 1px solid #2A394F;
      
      &::after {
        width: 100%;
      }
    }
  }
  
  li:first-child a::before {
    content: "\f015";
  }
  li:nth-child(2) a::before {
    content:"\f198";
  }
  li:nth-child(3) a::before {
    content:"\f0f3";
  }
  li:nth-child(4) a::before {
    content:"\f0e0";
  }
  li:nth-child(5) a::before {
    content:"\f02e";
  }
  li:nth-child(6) a::before {
    content:"\f03a";
  }
  li:nth-child(7) a::before {
    content:"\f007";
  }
  li:last-child a::before {
    content:"\f141";
  }
}
View Compiled
const Menu = () => {
    return (
        <ul className="nav">
            <li><a href="#">主页</a></li>
            <li><a href="#">探索</a></li>
            <li><a href="#">通知</a></li>
            <li><a href="#">私信</a></li>
            <li><a href="#">书签</a></li>
            <li><a href="#">列表</a></li>
            <li><a href="#">个人资料</a></li>
            <li><a href="#">更多</a></li>
        </ul>
    )
}

const rootElement = document.getElementById("app");
ReactDOM.render(<Menu  />, rootElement);
View Compiled

External CSS

  1. https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/react/16.10.2/umd/react.production.min.js
  2. https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.10.2/umd/react-dom.production.min.js