Enlarging images with CSS (or jQuery) without moving everything else on the page

前端 未结 6 1832
暖寄归人
暖寄归人 2021-01-05 19:28

I have a dynamically generated set of images (with a comment near every image). I want to display every image with max-width and max-height of 48 px, but when the user is ho

6条回答
  •  被撕碎了的回忆
    2021-01-05 20:22

    https://jsfiddle.net/dafemtg1/

    FYI, CSS using the transform property:

    img{transition:all 0.2s;}
    img:hover {transform:scale(1.4);transition:all 0.2s;}
    

提交回复
热议问题