轮播图

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

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        .photo {
            margin: 0 auto;
            width: 400px;
            height: 300px;
            overflow: hidden;
            position: relative;
        }

        .photo ul {
            overflow: hidden;
            width: 500%;
            position: absolute;
            top: 0;
            left: 0;
            animation: run 10s linear 1s infinite alternate ;
        }

        .photo ul li {
            list-style: none;
            float: left;
            width: 20%;
        }

        .photo ul li a {
            display: block;
            text-decoration: none;
        }

        .photo ul li a img {
            display: block;
            width: 400px;
            height: 300px;
        }

        @keyframes run {
            from {
                left: 0;
                top: 0;
            }
            to {
                left: -1600px;
                top: 0;
            }
        }
        .left,.right{
            position: absolute;
            top: 50%;
            width: 30px;
            height: 50px;
            border-radius: 30%;
            background-color: rgba(255,255, 255, 0.3);
            line-height: 50px;
            text-align: center;
            font-size: 30px;
            font-weight: 700;
            color: palevioletred;

        }
        .left{
           left: 0;
           margin-top: -25px;
        }
        .right{
            right: 0;
           margin-top: -25px;
        }
        .circles{
            width: 100%;
            position: absolute;
            bottom: 10px;
            text-align: center;
        }
        .circles .yuan{
            display: inline-block;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background-color: white;
        }
        .yuan:hover{
            background-color: pink;
        }
        .left:hover{
            background-color: rgba(0, 0, 0, .5);
            color: yellow;
        }
        .right:hover{
            background-color: rgba(0, 0, 0, .5);
            color: yellow;
        }
    </style>
</head>

<body>
    <div class="container">
<!-- 相框 -->
<div class="photo">
        <!-- 照片条 -->
        <ul>
            <!-- 照片 -->
            <li><a href=""><img src="./image/1.jpg" alt=""></a></li>
            <li><a href=""><img src="./image/2.jpg" alt=""></a></li>
            <li><a href=""><img src="./image/3.jpg" alt=""></a></li>
            <li><a href=""><img src="./image/4.jpg" alt=""></a></li>
            <li><a href=""><img src="./image/5.jpg" alt=""></a></li>
        </ul>
        <!-- 箭头 -->
    <div class="left"><</div>
    <div class="right">></div>
    <!-- 小圆圈 -->
    <div class="circles">
        <span class="yuan"></span>
        <span class="yuan"></span>
        <span class="yuan"></span>
        <span class="yuan"></span>
        <span class="yuan"></span>
    </div>
    </div>
    
</body>

</html>

在这里插入图片描述

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值