LoginSignup
13
14

More than 5 years have passed since last update.

hoverで画像がでかくなるCSS

Last updated at Posted at 2013-05-15

リンクの貼った画像にマウスを乗せると、画像がでかくなるCSS。

transitionの数字のところ(動きの時間(s:秒))と

transformのscale()(以下は1.05倍になる)の数値を調整するといい感じに。

あ、IEの9以下は…

a img {
-webkit-transition: all 0.5s ease; 
-moz-transition: all 0.5s ease; 
-o-transition: all 0.5s ease; 
-ms-transition: all 0.5s ease; 
transition: all 0.5s ease; 
}

a img:hover { 
-webkit-transform: scale(1.05);  
-moz-transform: scale(1.05); 
-o-transform: scale(1.05); 
-ms-transform: scale(1.05); 
transform: scale(1.05); 
}
13
14
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
14