js轮播图有,移入移出事件,左右滑动事件功能

作者 : admin 本文共679个字,预计阅读时间需要2分钟 发布时间: 2024-06-17 共1人阅读

效果图:js轮播图有,移入移出事件,左右滑动事件功能插图

具体代码:









    * {
        margin: 0;
        padding: 0;
    }

    .banner {
        width: 100%;
        height: 500px;
        overflow: hidden;
        position: relative;
    }

    .tow {
        width: 600%;
        height: 500px;
        margin-left:0%;
        display: flex;
        display: relative;
        /* transition: 1s all ; */
    }

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

    .five {
        position: absolute;
        bottom: 0px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        bottom: 0;
        border: 1px solid lightgray;

    }

    .five span {
        width: 15px;
        height: 15px;
        display: block;
        background-color: antiquewhite;
        border-radius: 50%;
        display: flex;



    }

    .but {
        width: 100%;
        height: 30px;
        position: absolute;
        border-radius: 50%;
        top: 37%;

        display: flex;
        justify-content: space-between;

    }

    .but span {
        display: none;
        background-color: aqua;
    }

    .banner:hover .but span {
        display: block;
    }



    
        js轮播图有,移入移出事件,左右滑动事件功能插图(1)
        js轮播图有,移入移出事件,左右滑动事件功能插图(2)
        js轮播图有,移入移出事件,左右滑动事件功能插图(3)
        js轮播图有,移入移出事件,左右滑动事件功能插图(4)
		js轮播图有,移入移出事件,左右滑动事件功能插图(5)
		js轮播图有,移入移出事件,左右滑动事件功能插图(6)
    
    
    
        <
        >
    



具体的轮播可以根据需求进行调整;希望可以帮到大家;

本站无任何商业行为
个人在线分享 » js轮播图有,移入移出事件,左右滑动事件功能
E-->