Pee*_*n87 6 css height transition
我做了一个css过渡,从高度自动到高度:75%.
CSS-过渡:
-webkit-transition: height 0.5s ease-in-out;
-moz-transition: height 0.5s ease-in-out;
-o-transition: height 0.5s ease-in-out;
transition: height 0.5s ease-in-out;
Run Code Online (Sandbox Code Playgroud)
但它不适用于IE和Firefox.我在谷歌上发现了一些帖子,但无法找到解决方案.
谢谢你的帮助.
要使用%
andauto
你可以尝试min-height
像这样:
div {
-webkit-transition: height 1s ease-in-out;
-moz-transition: all 1s ease-in-out;
-o-transition: all 1s ease-in-out;
transition: all 1s ease-in-out;
}
div:hover {
min-height:75%;
}
Run Code Online (Sandbox Code Playgroud)
检查这个演示小提琴
在 Chrome 31 - Firefox 26 中测试