JS+CSS动画 Banner无限轮播图 呼吸轮播

 

 

 <style>
        *{
            margin: 0;
            padding: 0;
        }
        .carousel{
            width: 650px;
            height: 360px;
            border: 1px solid #000;
            /* 居中显示上下50px 左右auto */
            margin: 50px auto;
            position: relative;
            overflow: hidden;
        }
        .carousel ul{
            /* 去掉li的左边的· */
            list-style: none;
            /* 设置大宽度,让<li>float上来 */
            width: 6000px;
            /* 给子标签的绝对定位做标记物 */
            position: relative;
            left: 0px;
            /* 过渡动画 :动画方向 持续时间 模式 延迟*/
            transition: left 0.5s ease 0s;
        }
        .carousel ul li{
            /* 边框 宽度 实线 颜色 */
            border: 1px solid #000;
            font-size: 80px;
            /* 文字居中中 */
            line-height: 358px;
            text-align: center;
            float: left;
            width: 648px;
        }
        .carousel .leftBtn{
            /* 覆盖用绝对定位 */
            position: absolute;
            /* 绝对定位用的 */
            left: 20px;
            /* 垂直居中 */
            top: 50%;
            margin-top: -25px;
            width: 50px;
            height: 50px;
            background-color: orange;
            border-radius: 50%;
        }
        .carousel .rightBtn{
            /* 覆盖用绝对定位 */
            position: absolute;
            /* 绝对定位用的 */
            right: 20px;
            /* 垂直居中 */
            top: 50%;
            margin-top: -25px;
            width: 50px;
            height: 50px;
            background-color: orange;
            border-radius: 50%;
        }

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值