<分区>
我想知道如何在带有链接的 img 上设置绿色覆盖。
<section>
<div class='container>
<div class='row'>
<a href ='https://stackoverflow.com/' target="_blank">
<img src="i cant cause i need at least 10 rep to post images">
</a>
</div>
</div>
</section>
只有 css 或 bootstrap4,没有框架。 谁能帮忙? :)
最佳答案
您可以为此使用纯 css。这将使您的图像背景在悬停时变为绿色。
img{
width:50px;
height:50px;
background-image: url("URL TO IMAGE");
}
img:hover{
background-color: green;
background-blend-mode: multiply;
}
关于html - 悬停时 IMG 链接覆盖,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49283906/