tab.css 1.6 KB
.m-nav {
  width: 100%;
  font-size: 14px;
  color: #999;
  overflow: hidden;
  box-sizing: border-box;
}
.m-nav a {
  color: #999;
  padding: 0 10px;
  min-width: 70px;
  display: block;
}
.m-nav li {
  float: left;
  line-height: 40px;
  text-align: center;
  position: relative;
}
.m-nav li:last-child {
  padding-right: 0;
}
.m-nav .on a {
  color: #FFF;
  background-color: #23ac38;
  display: block;
  position: relative;
}
.m-tab {
  width: 100%;
  background-color: #FFF;
  font-size: 14px;
  color: #999;
  border-width: 1px 0;
  overflow: hidden;
  box-sizing: border-box;
  margin-bottom: 10px;
}
.m-tab a {
  display: block;
  color: #999;
  padding: 0 10px;
  min-width: 70px;
}
.m-tab li {
  float: left;
  line-height: 45px;
  text-align: center;
  position: relative;
}
.m-tab li:last-child {
  padding-right: 0;
}
.m-tab .on a {
  color: #23ac38;
  display: block;
  position: relative;
}
.m-tab .on a:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #23ac38;
}
.m-tab.hasright {
  position: relative;
}
.m-tab.hasright:before {
  content: ' ';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  transform: scaleY(1);
  animation: movehint 1.2s linear 3;
  -webkit-animation: movehint 1.6s linear 3;
  transition: all .3s;
  -webkit-transition: all .3s;
  opacity: 0;
  border-top: 2px solid #23ac38;
}
.m-tab.hasright:after {
  content: ' ';
  display: block;
  position: absolute;
  top: 0;
}
@keyframes movehint {
  30%,
  60%,
  90% {
    opacity: 1;
  }
  0% {
    width: 0;
  }
  100% {
    width: 100%;
  }
}