img { web
width:100px;orm
height:100px;it
transition: all 0.5s; io
-moz-transition: all 0.5s; /* Firefox 4 */ form
-webkit-transition: all 0.5s; /* Safari 和 Chrome */ 基礎
-o-transition: all 0.5s; /* Opera */transform
}webkit
img:hover { transition
transform: scale(1.1); im
-ms-transform: scale(1.1); /* IE 9 */
-moz-transform: scale(1.1); /* Firefox */
-webkit-transform: scale(1.1); /* Safari 和 Chrome */
-o-transform: scale(1.1);
}
transform: all 0.5; all指的是width 和 height 同時變換,變換時間爲0.5s,
transform: scale(1.1)指在原來的基礎上放大1.1倍;