.image-change-template-1 img { position: relative; opacity:1; transition: 0.3s; } .imgae-change-template-2 { position: absolute; opacity: 1; transition: 0.3s; } .imgae-change-template-1 img:hover { position: relative; opacity:0; transition: 0.3s; }