我怎样才能在 css 比例下获得更慢的动画?
how can i get slower animaton in css scale?
我写这段代码是为了让我的菜单动起来
.main-navigation a:hover{
transform: scale(1.1)!important;
但我想要随着时间或其他任何东西放慢动画速度
添加 transition: 0.3s
(或您想要的任何其他时间)。
这应该有效:
.main-navigation a {
transition: transform 250ms;
transform-origin: center center;
}
.main-navigation a:hover{
transform: scale(1.1) !important;
}
一个友好的建议:尝试设置您的 CSS 这样您就不必再使用 !important
.
我写这段代码是为了让我的菜单动起来
.main-navigation a:hover{
transform: scale(1.1)!important;
但我想要随着时间或其他任何东西放慢动画速度
添加 transition: 0.3s
(或您想要的任何其他时间)。
这应该有效:
.main-navigation a {
transition: transform 250ms;
transform-origin: center center;
}
.main-navigation a:hover{
transform: scale(1.1) !important;
}
一个友好的建议:尝试设置您的 CSS 这样您就不必再使用 !important
.