接触图片后触发引发图片放大缩小的css特效

Blog 1 css关键代码如下:

figure.effect-zoe img {
    opacity: 0.7;
    -webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
     transition: opacity 0.35s, transform 0.35s;
    -webkit-transform: scale(1);
    transform: scale(1);
    transition: all 0.3s ease 0s;
}
 
figure.effect-zoe:hover img {
    opacity: 0.6;
    -webkit-transform: scale(0.9);
    transform: scale(0.9);
    transition: all 0.3s ease 0s;


通过以上的css样式,即可达到接触图片后自动触发图片放大缩小的h5特效