.tabs { display: flex; background-color: #fff; font-size: 14px; color: #666; } .tab-item { width: 33.33%; text-align: center; height: 44px; line-height: 44px; position: relative; } .tab-item[data-active=true] { color: var(--primary-color); } .tab-item[data-active=true]::before { display: block; content: ''; height: 3px; width: 36%; background-color: var(--primary-color); position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); }