本文主要和大家分享css鼠标悬浮图片遮罩效果实现代码,希望能帮助到大家。
css
p>p{ background: rgba(255, 255, 255, 0); transition: background 0.3s linear;}p:hover>p{ background: rgba(228, 228, 228, 0.29);}html
<p style="width:200px;height:200px;position: absolute;">
<img src="img/img.jpg" style="width: 100%;height: 100%;"/>
<p style="position: absolute;width: 100%;height: 100%;top: 0;"></p></p>相关推荐:










