黑马就业班第一天作业

<!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>

        * {

            margin: 0;

            padding: 0;

            box-sizing: border-box;

        }

        body {

            background-color: black;

        }

     .box {

        display: flex;

        width: 1200px;

        height: 200px;

        list-style: none;

        margin: 100px auto 0;

     }

     .box li {

        overflow: hidden;

        position: relative;

        flex: 1;

       transition:all .6s;

        border: 2px solid transparent;

     }

     .box li:nth-child(-n+3) {

        margin-right: 20px;

     }

     .box li img {

        width: 100%;

        height: 100%;

        transition: all .5s;

     }

     .box li:hover {

       border: 2px solid yellow;

     }

     .box li:hover img {

        transform: scale(1.3);

     }

     .box li::before {

        content: '';

        position: absolute;

        left: 0;top: 0;

        width: 100%;

        height: 100%;

        background-color: rgba(0, 0, 0, .4);

        opacity: 0;

        transition: all .5s;

        z-index: 5;

     }

     .box li:hover::before {

        opacity: 1;

     }

     .box li::after {

        content: '高山流水--庄周';

        position: absolute;

        bottom: 20px;

        left: 50%;

        transform: translate(-50%,0);

        color: #fff;

        transition: all .3s;

     }

     .box li:hover::after {

         opacity: 0;

     }

     .box li .info {

        position: absolute;

        left: 50%;

        top: 50%;

        transform: translate(-50%,-50%);

        border: 1px solid yellow;

        width: 80%;

        height: 80%;

        text-align: center;

        padding-top: 35px;

        color: #fff;

        opacity: 0;

        transition: all .8s;

        cursor: pointer;

        z-index: 6;

     }

     .box li .info h4 {

         font-size: 20px;

         margin-bottom: 5px;

         font-weight: normal;

     }

     .box li .info span {

        font-size: 12px;

     }

     .box li .info p {

        margin-top: 5px;

        font-size: 12px;

     }

     .box li:hover .info {

        opacity: 1;

     }

    </style>

</head>

<body>

    <ul class="box">

        <li><img src="../img/1.jpg" alt="">

            <div class="info">

                <h4>高山流水--庄周</h4>

                <span>辅助</span>

                <p>上线时间: 2021.10.28</p>

            </div>

        </li>

        <li>

            <img src="../img/2.jpg" alt="">

            <div class="info">

                <h4>高山流水--庄周</h4>

                <span>辅助</span>

                <p>上线时间: 2021.10.28</p>

            </div>

        </li>

        <li>

            <img src="../img/3.webp" alt="">

            <div class="info">

                <h4>高山流水--庄周</h4>

                <span>辅助</span>

                <p>上线时间: 2021.10.28</p>

            </div>

        </li>

        <li>

            <img src="../img/4.webp" alt="">

            <div class="info">

                <h4>高山流水--庄周</h4>

                <span>辅助</span>

                <p>上线时间: 2021.10.28</p>

            </div>

        </li>

    </ul>

</body>

</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值