Closed mslxl closed 1 week ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
astro-theme-typography | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Sep 22, 2024 1:37pm |
这里我最开始也加了一点动效,但是 underline 的颜色会在移开指针后立刻更改颜色,现在还没想到合适的处理方式🤔
用 pseudo class 去模拟 underline 怎么样? 这样就可以给 pseudo class 塞点动画。
:where(a):not(.not-underline-hover) {
--at-apply: 'underline-hover';
position: relative;
text-decoration: none; /*temporarily modify*/
transition: color .3s ease 0s, background-color .3s ease 0s;
}
:where(a):not(.not-underline-hover)::after {
content: '';
position: absolute;
left: 2px;
right: 2px;
bottom: 0;
height: 2px;
background-color: var(--uno-colors-foreground);
}
视觉效果上感觉看不出来和 underline 的区别
不过像这种 underline 的动画我不太会设计,感觉加上动效也挺奇怪的
我研究了一下发现可以解决这个问题,已经提交了新的 PR #151,这边就先关闭啦~
加了 0.3 秒的 ease 效果,感觉能让视觉效果好些。突然的变化
感觉就像灯泡突然亮了一样,和右边的标题 hover 动画不太搭配