【发布时间】:2017-01-06 09:43:27
【问题描述】:
我正在尝试用一个较小的图像覆盖一个图像,该图像在悬停时具有第一张图像的背景不透明度,仅使用 css,因为我无法编辑 html。
这是一个示例 HTML:
<div class="image">
<a href="http://www.example.com">
<img src="/uploads/2016/08/img1.png" class="rggclImgCenter">
</a>
</div>
仅使用 CSS,我认为会是这样的:
.image:hover {
background-image: url('https://cdn4.iconfinder.com/data/icons/ionicons/512/icon-ios7-arrow-right-128.png');
}
但它只会替换图像。
【问题讨论】: