Dot Indicator Tabs
アクティブタブの下にドットが移動するタブナビ。
HTML
<nav class="dot-tabs"> <a href="javascript:void(0)" class="dt active">All</a> <a href="javascript:void(0)" class="dt">Design</a> <a href="javascript:void(0)" class="dt">Dev</a> </nav>
CSS
.dot-tabs {
display: flex;
gap: 1.5rem;
}
.dt {
position: relative;
font-size: 14px;
font-weight: 500;
color: #999;
text-decoration: none;
padding-bottom: 8px;
transition: color .2s;
}
.dt::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
width: 4px;
height: 4px;
background: #1a1a1a;
border-radius: 50%;
transform: translateX(-50%) scale(0);
transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.dt:hover, .dt.active { color: #1a1a1a; }
.dt:hover::after, .dt.active::after { transform: translateX(-50%) scale(1); }