首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >bootstrap-4 carousel在网页中不工作

bootstrap-4 carousel在网页中不工作
EN

Stack Overflow用户
提问于 2020-01-26 15:09:24
回答 1查看 422关注 0票数 0

我已经在网页中实现了一个旋转木马,但它不工作,我试图实现这个旋转木马"codepen.io/decibeldesign/details/bMrQKN“和完整的网页代码是"paste.ofcode.org/saJPkuhPPixFmXgDb7EnNX",我如何修复它任何建议?,、、,

代码:

代码语言:javascript
复制
 <div class="my-5 text-center container">
                            <div class="row d-flex align-items-center">
                               <div class="col-1 d-flex align-items-center justify-content-center">
                                  <a href="#carouselExampleIndicators" role="button" data-slide="prev">
                                     <div class="carousel-nav-icon">
                                        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 129 129" xmlns:xlink="http://www.w3.org/1999/xlink" style="height: 50px;">
                                           <path d="m88.6,121.3c0.8,0.8 1.8,1.2 2.9,1.2s2.1-0.4 2.9-1.2c1.6-1.6 1.6-4.2 0-5.8l-51-51 51-51c1.6-1.6 1.6-4.2 0-5.8s-4.2-1.6-5.8,0l-54,53.9c-1.6,1.6-1.6,4.2 0,5.8l54,53.9z"/>
                                        </svg>
                                     </div>
                                  </a>
                               </div>
                               <div class="col-6">
                                  <!--Start carousel-->
                                  <div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">

                                     <div class="carousel-inner">
                                        <div class="carousel-item active">
                                           <div class="row">
                                              <div style="background-image:url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/46992/flexfun04.jpg');" class="col-12 col-md d-flex align-items-center justify-content-center">
                                              </div>
                                              <div style="background-image:url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/46992/flexfun02.jpg');" class="col-12 col-md d-flex align-items-center justify-content-center">
                                              </div>
                                              <div style="background-image:url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/46992/flexfun05.jpg');" class="col-12 col-md d-flex align-items-center justify-content-center" class="col-12 col-md d-flex align-items-center justify-content-center">
                                                <div class="col-md-2 col-xs-12 upcoming-btn">
                                                    <span href="" class="btn btn-success btn-lg dashboard-icon" 
                                                    style="min-width: 60px; max-width: 180px; height: 140px;">
                                                        <p style="padding-top: 25px;">date</p>
                                                        <p>Upcoming Meeting</p>
                                                    </span>
                                                </div>
                                                <div class="col-md-2 col-xs-12 completed-btn">
                                                    <span href="" class="btn btn-warning btn-lg dashboard-icon" 
                                                    style="min-width: 60px; max-width: 180px; height: 140px;">
                                                        <p style="padding-top: 25px;">date</p>
                                                        <p>Completed Meeting</p>
                                                    </span>
                                                </div>
                                              </div>
                                           </div>
                                        </div>
                                        <div class="carousel-item">
                                           <div class="row">
                                              <div style="background-image:url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/46992/flexfun01.jpg');" class="col-12 col-md d-flex align-items-center justify-content-center">
                                              </div>
                                              <div style="background-image:url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/46992/flexfun03.jpg');" class="col-12 col-md d-flex align-items-center justify-content-center">
                                              </div>
                                              <div style="background-image:url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/46992/flexfun06.jpg');" class="col-12 col-md d-flex align-items-center justify-content-center" class="col-12 col-md d-flex align-items-center justify-content-center">
                                              </div>
                                           </div>
                                        </div>
                                     </div>
                                  </div>
                                  <!--End carousel-->
                               </div>
                               <div class="col-1 d-flex align-items-center justify-content-center"><a  href="#carouselExampleIndicators" data-slide="next">
                                  <div class="carousel-nav-icon">
                                     <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 129 129" xmlns:xlink="http://www.w3.org/1999/xlink" style="height: 50px;">
                                        <path d="m40.4,121.3c-0.8,0.8-1.8,1.2-2.9,1.2s-2.1-0.4-2.9-1.2c-1.6-1.6-1.6-4.2 0-5.8l51-51-51-51c-1.6-1.6-1.6-4.2 0-5.8 1.6-1.6 4.2-1.6 5.8,0l53.9,53.9c1.6,1.6 1.6,4.2 0,5.8l-53.9,53.9z"/>
                                     </svg>
                                  </div>
                                  </a>
                               </div>
                            </div>
                         </div>
EN

回答 1

Stack Overflow用户

发布于 2020-01-26 15:20:58

您必须添加以下文件:

代码语言:javascript
复制
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0/css/bootstrap.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0/js/bootstrap.min.js"></script>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59916290

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档