当前位置:网站首页>Video display and hiding of imitation tudou.com

Video display and hiding of imitation tudou.com

2022-07-05 01:49:00 dengfengling999

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .tudo {
            position: relative;
            width: 444px;
            height: 320px;
            background-color: pink;
            margin: 30px auto;
        }

        .tudo img {
            width: 100%;
            height: 100%;
        }

        .mask {
            display: none;
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, .4) url(images/g.png) no-repeat center;
        }

        /*  When the mouse passes the potato box , Let the mask layer show  */
        .tudo:hover .mask {
            display: block;
        }
    </style>
</head>

<body>
    <div class="tudo">
        <div class="mask"></div>
        <img src="images/photo.jpg" alt="">
    </div>
</body>

</html>

result :

When the mouse clicks : 

 

 

原网站

版权声明
本文为[dengfengling999]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202141011560119.html