纯 css js 实现 tab 切换底部滑块跟随滑动效果

<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <title>tab 切换滑块跟随</title>
  <style>
    body {
   
      padding: 0;
      margin: 0;
    }

    .bar {
   
      width: 42px;
      border-bottom: 2px solid #489C9C;
    }

    .content {
   
      display: flex;
    }

    .content div {
   
      height: 40px;
      line-height: 40px;
      text-align

你可能感兴趣的:(html,css,js,tab,切换滑块跟随)