CSS元素过渡高度不适用于chrome

时间:2014-04-21 23:41:16

标签: css google-chrome height css-transitions

我试图在css上进行一些过渡动画,除了元素的高度以外都有效。 我正在使用Chrome,而其他一些像Safari之类的浏览器的人告诉我它工作正常,我甚至需要它才能在所有主流浏览器上运行,而且我目前正试图找到修复Chrome的方法。这是小提琴: http://jsfiddle.net/VPCxq/2/

你可以看到我有我的元素(#test),在我的CSS中我有:

#test{
    height: 4vh;
    -prefixes-transition-property: height;
    -prefixes-transition-duration: 0.3s;
}
#text:hover{
    height:8vh;
}

但高度没有动画。在小提琴中,我把其他东西只是为了表明它们起作用。有没有人为此修复了Chrome?

1 个答案:

答案 0 :(得分:1)

您无法转换到auto或从auto转换。 #test { height: 4vh; } 被替换为0.添加:

{{1}}

http://jsfiddle.net/bFJ29/

相关问题