<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <style>
        div {
            width: 100px;
            height: 100px;
            background-color: pink;
            text-align: center;
            line-height: 100px;
            margin: 100px auto;
            position: relative; /* 子绝父相 */

        }
        div img {
            position: absolute;
            left: 110px;
            top: 0;
            display: none;  /* 隐藏二维码 */
        }
        div:hover img {  /* 我们鼠标经过div 的时候, 里面的 那个 img图片会显示出来 */
            display: block;  /* 显示二维码  */
        }
        </style>
    </head>
    <body>
    <div>
        扫二维码
        <img src="images/erweima.png"  alt="">
    </div>
    </body>
</html>

 

相关文章:

  • 2022-12-23
  • 2021-07-24
  • 2022-02-10
  • 2022-12-23
  • 2021-08-18
  • 2021-10-11
  • 2022-12-23
  • 2021-09-06
猜你喜欢
  • 2022-12-23
  • 2021-12-29
  • 2021-04-23
  • 2021-09-07
  • 2022-12-23
  • 2022-12-23
  • 2021-09-15
相关资源
相似解决方案