Hover to change the background to another layer, hover to change the transparency of that layer. For example: If you want to:

div{transition:.5s; } div:hover{background:url(img); }Copy the code

div{position:relative; } div:after{content:' '; position:absolute; left:0; right:0; top:0; bottom:0; background:url(img); opacity:0; transition:.5s; } div:hover:after{opacity:1; }Copy the code