我做了以下簡單的動畫,其中圖像在鼠標懸停時增長,但我真正想要的是它發生沒有懸停,即頁面加載時。Webkit轉換沒有懸停
HTML
<div id="first" class="animated grow"><img src="images/sunflower.png"></div>
CSS
/* GROW ANIMATION */
.grow img {
position: absolute;
bottom: 0;
height: 400px;
width: 160px;
-webkit-transition: all 5s ease;
-moz-transition: all 5s ease;
-o-transition: all 5s ease;
-ms-transition: all 5s ease;
transition: all 5s ease;
}
.grow img:hover {
width: 200px;
height: 500px;
}
我嘗試使用以下,但它不工作。
from {width: 160px; height: 400px;}
to {width: 200px; height: 500px;}
要麼是錯誤的路要走,要麼我沒有放在正確的地方。