我无法使用css中的过渡内容来淡出和淡出图像。有人能看到问题吗?我不是试图让背景只转换为悬停在它上面的img。
.icongestaltung{
background: url(images/startpageicon_draw.png) no-repeat;
background-size: contain;
width: 8em;
height: 8em;
float: left;
-webkit-transition: all .7s ease-in-out;
-moz-transition: all .7s ease-in-out;
transition: all .7s ease-in-out;
}
.icongestaltung:hover{
background-image:url("images/startpageicon_gestaltungunddesign.png");
}
<!DOCTYPE html>
<html>
<body>
<div class="startpageicons">
<div class="icongestaltung">
</div>
</div>
<footer>
</footer>
</body>
</html>
谢谢:)