会员可以在此提问,百战程序员老师有问必答
对大家有帮助的问答会被标记为“推荐”
看完课程过来浏览一下别人提的问题,会帮你学得更全面
截止目前,同学们一共提了 132384个问题
Python 全系列/第一阶段:Python入门/控制语句 17913楼
JAVA 全系列/第十二阶段:Spring Cloud Alibaba技术栈/分布式流量防护-Sentinel 17915楼

image.pngimage.png

JAVA 全系列/第五阶段:JavaWeb开发/XML技术(旧) 17919楼
JAVA 全系列/第一阶段:JAVA 快速入门/控制语句、方法、递归算法 17920楼
JAVA 全系列/第十八阶段:亿级高并发电商项目_架构/编码(旧)/电商:基于FastDFS+Nginx+Kinkeditor实现商品新增 17921楼

<!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>
    <link rel="stylesheet" href="./swiper-bundle.min.css">
    <style>
        .swiper{
            width: 600px;
            height: 300px;
        }
    </style> 
</head>
<body>
    <div class="swiper">
        <div class="swiper-wrapper">
            <div class="swiper-slide">Slide 1</div>
            <div class="swiper-slide">Slide 2</div>
            <div class="swiper-slide">Slide 3</div>
        </div>
        <div class="swiper-pagination"></div>
        <div class="swiper-button-prev"></div>
        <div class="swiper-button-next"></div>
    </div>
    <script src="./swiper-bundle.min.js"></script>
    <script>
        var mySwiper=new Swiper(".swiper",{
            loop:true,
            pagination:{
                el:'.swiper-pagination',
            },
            navigation:{
                nextE1:'.swiper-button-next',
                prevE1:'.swiper-button-prev',
            },
        })
    </script>
</body>
</html>

image.png

老师,为啥我的swiper轮播图动不起来,点左右箭头没反应

Python 全系列/第七阶段:网页编程基础/jQuery应用 17923楼

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

        body {
            background-color: gray;
        }

        .container {
            width: 1240px;
            margin: 0 auto;
        }

        /* .container ul {} */

        .container ul li{
            position: relative;
            float: left;
            list-style: none;
            margin-right: 9px;
            margin-top: 10px;
            width: 303px;
            height: 375px;
            background-color: white;
        }

        .container ul li:nth-child(4n) {
            margin-right: 0px;
        }

        .container ul li a {
            display: block;
            width: 100%;
            height: 100%;
            text-align: center;
            text-decoration: none;
        }

        .container ul li a img {
            width: 200px;
            margin-top: 30px;
        }

        .container ul li a .text {
            width: 100%;
        }

        .text .name {
            display: block;
            color: #333;
            font-size: 16px;
            margin-bottom: 2px;
        }

        .text .desc {
            display: block;
            color: #999;
            font-size: 14px;
        }

        .text .price i {
            font-style: normal;
            font-size: 14px;
            margin-bottom: 3px;
        }

        .text .price {
            display: inline-block;
            color: #c00;
            font-size: 22px;
            padding-left: 14px;
        }

        .text .price em {
            font-size: 16px;
            font-style: normal;
        }

        .product-sign {
            position: absolute;
            left: 30px;
            top: 30px;
            display: block;
            height: 60px;
            width: 60px;
            background-color: pink;
            border-radius: 50%;
            line-height: 60px;
            color: white;
            font-size: 16px;
            text-align: center
        }
    </style>
</head>

<body>
    <div class="container">
        <ul>
            <li>
                <a href="#">
                    <img src="1.png" alt="">
                    <div class="text">
                        <span class="name">魅族 18s Pro</span>
                        <span class="desc">限时至高特惠500 | 12期免息</span>
                        <span class="price"><i>¥</i>3999<em>起</em></span>
                        <div>
                            <span class="product-sign">免息</span>
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="1.png" alt="">
                    <div class="text">
                        <span class="name">魅族 18s Pro</span>
                        <span class="desc">限时至高特惠500 | 12期免息</span>
                        <span class="price"><i>¥</i>3999<em>起</em></span>
                        <div>
                            <span class="product-sign">免息</span>
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="1.png" alt="">
                    <div class="text">
                        <span class="name">魅族 18s Pro</span>
                        <span class="desc">限时至高特惠500 | 12期免息</span>
                        <span class="price"><i>¥</i>3999<em>起</em></span>
                        <div>
                            <span class="product-sign">免息</span>
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="1.png" alt="">
                    <div class="text">
                        <span class="name">魅族 18s Pro</span>
                        <span class="desc">限时至高特惠500 | 12期免息</span>
                        <span class="price"><i>¥</i>3999<em>起</em></span>
                        <div>
                            <span class="product-sign">免息</span>
                </a>
            </li>
        </ul>
    </div>
</body>

</html>

class="text"不是在大的div里面嘛,为什么在浏览器里面显示却不是在里面啊2ZPV]28E3B@7}G4Y$D{_W$G.png

Python 全系列/第七阶段:网页编程基础/浮动与定位 17924楼
Python 全系列/第一阶段:Python入门/Python入门(动画版) 17925楼

课程分类

百战程序员微信公众号

百战程序员微信小程序

©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园
网站维护:百战汇智(北京)科技有限公司
京公网安备 11011402011233号    京ICP备18060230号-3    营业执照    经营许可证:京B2-20212637