SOURCE

console 命令行工具 X clear

                    
>
console
$("ul li").click(function(e) {

  if ($(this).hasClass('slider')) {
    return;
  }
  $("li").css("color","#ffffff");
  $(this).css("color","#000000");
  
  var whatTab = $(this).index();
  var w = $("ul").width();
  var howFar = w / 5 * whatTab;

  $(".slider").css({
    left: howFar + "px"
  });

  $(".ripple").remove();

  var posX = $(this).offset().left,
  posY = $(this).offset().top,
  buttonWidth = $(this).width(),
  buttonHeight = $(this).height();

  $(this).prepend("<span class='ripple'></span>");

  if (buttonWidth >= buttonHeight) {
    buttonHeight = buttonWidth;
  } else {
    buttonWidth = buttonHeight;
  }

  var x = e.pageX - posX - buttonWidth / 2;
  var y = e.pageY - posY - buttonHeight / 2;

  $(".ripple").css({
    width: buttonWidth,
    height: buttonHeight,
    top: y + 'px',
    left: x + 'px'
  }).addClass("rippleEffect");

});
<ul>
			<li class="de">第一页</li>
			<li>第二页</li>
			<li>第三页</li>
			<li>第四页</li>
			<li>第五页</li>
			<li class="slider"></li>
</ul>
ul {
  font-size: 0;
  position: relative;
  padding: 0;
  width: 95%;
  margin: 5px auto;
  user-select: none;
  /*文字不能被选中*/
}

li {
  display: inline-block;
  width: 20%;
  height: 30px;
  background: #E95546;
  font-size: 12px;
  text-align: center;
  line-height: 30px;
  color: #fff;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.de {
  color:#000000;  
}

.slider {
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background: #4FC2E5;
  transition: all 0.5s;
}

.ripple {
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  -webkit-transform: scale(0);
  -ms-transform: scale(0);
  transform: scale(0);
  position: absolute;
  opacity: 1;
}

.rippleEffect {
  -webkit-animation: rippleDrop .4s linear;
  animation: rippleDrop .4s linear;
}

@-webkit-keyframes rippleDrop {
  100% {
    -webkit-transform: scale(2);
    transform: scale(2);
    opacity: 0;
  }
}

@keyframes rippleDrop {
  100% {
    -webkit-transform: scale(2);
    transform: scale(2);
    opacity: 0;
  }
}

本项目引用的自定义外部资源