gpt4 book ai didi

html - 如何为链接添加悬停过渡?

转载 作者:太空宇宙 更新时间:2023-11-03 23:27:22 25 4
gpt4 key购买 nike

我想为我的链接添加过渡效果。我希望 text-decoration(即 underlink)慢慢出现。我试过这个但它不起作用:

#slink{
transition-property: text-decoration;
transition-duration: 500ms;
transition-timing-function: linear;
}
#slink:hover{
background: none;
}

我需要做什么才能让它工作?

最佳答案

你可以使用 border-bottom!

a {
transition: border-bottom 1s ease;
}
a:hover {
border-bottom: 1px solid blue;
}

关于html - 如何为链接添加悬停过渡?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26443326/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com