css滑鼠懸浮圖片遮罩效果實現代碼

來源:互聯網
上載者:User

本文主要和大家分享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>
相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.