微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

为什么我的轮播没有加载到我的网页?

如何解决为什么我的轮播没有加载到我的网页?

我无法将轮播加载到我的网页中。 我已经尝试向轮播 div 添加 CSS 高度/宽度,甚至尝试向包含的 img 元素添加高度,但一定在某处失败。 非常感谢所有帮助。这是值得注意的代码(从较大的文档中剪下)...

在我的脑海里:

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">        

在我身体的底部

<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>

旋转木马:

    <div id="carousel" class="carousel slide" data-right="carousel">
                        <div class="carousel-inner" roll="listBox">
                            <div class="carousel-item">
                                <img class="d-block w-100" src="https://www.neptunus.co.uk/app/uploads/2019/05/evolution-pieterschelte-rotterdam-76997-1.jpg" alt="Temporary structures built on the Pioneering Spirit catamaran">
                                <div class="carousel-caption">
                                    <h3>Pioneering Spirit</h3>
                                    <p>Weeks at sea produced thousands of square meters of temporary hospitality structures.</p>
                                </div>
                            </div>
                            <div class="carousel-item">
                                <img class="d-block w-100" src="https://www.eventindustrynews.com/wp-content/uploads/2018/03/Neptunus-Image-2.jpg" alt="Main structure for England's Rugby World Cup.">
                                <div class="carousel-caption">
                                    <h3>Rugby World Cup</h3>
                                    <p>Twickenham proves annual demand for White Rose Crew,but this year was special.</p>
                                </div>
                            </div>
                            <div class="carousel-item">
                                <img class="d-block w-100" src="https://www.neptunus.co.uk/app/uploads/2019/05/evolutioniii-thales-farnborough1.jpg" alt="A three story structure for Farnborough Airshow.">
                                <div class="carousel-caption">
                                    <h3>Thales</h3>
                                    <p>Our favourite biannual build of the worlds largest airshow.</p>
                                </div>
                            </div>
                            <div class="carousel-item">
                                <img class="d-block w-100" src="https://s3.eu-west-2.amazonaws.com/luxurylondon.co.uk-storage-bucket-001/images/articles-body/603/masterpiece-2019-london.jpg" alt="Masterpiece Arts Fair,Chelsea.">
                                <div class="carousel-caption">
                                    <h3>Masterpiece</h3>
                                    <p>We are proud to be an integral part of this incredible transformation year in,year out.</p>
                                </div>
                            </div>
                            <div class="carousel-item">
                                <img class="d-block w-100" src="https://ichef.bbci.co.uk/news/1024/cpsprodpb/62AF/production/_112536252_cdf_200420_cardiffhospital18.jpg" alt="Emergancy hospital built in the Pricipality Stadium.">
                                <div class="carousel-caption">
                                    <h3>Emergancy Covid-19 Field Hospital</h3>
                                    <p>Helping turn The Pricipality Stadium into Wales largest hospital in just 10 days.</p>
                                </div>
                            </div>
                        </div>
                    </div>

解决方法

检查 jquery cdn 并检查最新的 CDN。使用给定 CDN 的引导程序对您不起作用

,

我在发布这篇文章的那一刻就明白了。

我没有将任何幻灯片设置为“活动”。

容易修复:)

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。