Bootstrap Carousel 显示不正确

苏珊

我正在处理我的投资组合并粘贴了 Bootstrap 轮播的代码,但它没有正确显示。我一直在研究,但似乎找不到发生这种情况的原因。其他轮播模板也以类似方式显示。这看起来像 CSS 问题吗?

截屏:

截屏

这是代码:

 <!-- About Me ---------------------------------------------------------->
<section class="bg-primary" id="about">
<div class="container">
  <div class="row">
    <div class="col-lg-8 col-lg-offset-2 text-center aboutMe">
      <h2 class="section-heading">About Me</h2>
      <hr class="light">
      <p class="text-faded">I'm a full stack web developer with a passion for HTML and CSS. I love learning new languages and building from the ground up. In my spare time I enjoy being with my family and pets, traveling to Orleans, Cape Cod and avoiding doing laundry.
      </p>
    </div>
  </div>
</div>

<!---Carousel -------------------------------------------------------------->
    <div id="portfolio-Carousel" class="carousel slide" data-ride="carousel">
      <ol class="carousel-indicators">
        <li data-target="#portfolio-Carousel" data-slide-to="0" class="active"></li>
        <li data-target="#portfolio-Carousel" data-slide-to="1"></li>
        <li data-target="#portfolio-Carousel" data-slide-to="2"></li>
      </ol>
      <div class="carousel-inner" role="listbox">
        <div class="carousel-item active">
          <img class="d-block img-fluid" src="..." alt="First slide">
        </div>
        <div class="carousel-item">
          <img class="d-block img-fluid" src="..." alt="Second slide">
        </div>
        <div class="carousel-item">
          <img class="d-block img-fluid" src="..." alt="Third slide">
        </div>
      </div>
      <a class="carousel-control-prev" href="#portfolio-Carousel" role="button" data-slide="prev">
  <span class="carousel-control-prev-icon" aria-hidden="true"></span>
  <span class="sr-only">Previous</span>
</a>
      <a class="carousel-control-next" href="#portfolio-Carousel" role="button" data-slide="next">
  <span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
      </a>
</div>
</section>
天阮玉

您必须将carousel-item班级替换item班级。它会为你工作。

<section class="bg-primary" id="about">
<div class="container">
  <div class="row">
    <div class="col-lg-8 col-lg-offset-2 text-center aboutMe">
      <h2 class="section-heading">About Me</h2>
      <hr class="light">
      <p class="text-faded">I'm a full stack web developer with a passion for HTML and CSS. I love learning new languages and building from the ground up. In my spare time I enjoy being with my family and pets, traveling to Orleans, Cape Cod and avoiding doing laundry.
      </p>
    </div>
  </div>
</div>

<!---Carousel -------------------------------------------------------------->
    <div id="portfolio-Carousel" class="carousel slide" data-ride="carousel">
      <ol class="carousel-indicators">
        <li data-target="#portfolio-Carousel" data-slide-to="0" class="active"></li>
        <li data-target="#portfolio-Carousel" data-slide-to="1"></li>
        <li data-target="#portfolio-Carousel" data-slide-to="2"></li>
      </ol>
      <div class="carousel-inner" role="listbox">
        <div class="item active">
          <img class="d-block img-fluid" src="..." alt="First slide">
        </div>
        <div class="item">
          <img class="d-block img-fluid" src="..." alt="Second slide">
        </div>
        <div class="item">
          <img class="d-block img-fluid" src="..." alt="Third slide">
        </div>
      </div>
      <a class="carousel-control-prev" href="#portfolio-Carousel" role="button" data-slide="prev">
  <span class="carousel-control-prev-icon" aria-hidden="true"></span>
  <span class="sr-only">Previous</span>
</a>
      <a class="carousel-control-next" href="#portfolio-Carousel" role="button" data-slide="next">
  <span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
      </a>
</div>
</section>

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

Bootstrap Scrollspy不正确的突出显示

来自分类Dev

Bootstrap的药丸显示不正确

来自分类Dev

Bootstrap 3 无序列表显示不正确

来自分类Dev

Bootstrap Carousel:字幕不显示

来自分类Dev

ng-bootstrap 的 Carousel 在全窗口中看起来不正确,但在最低限度上看起来不错

来自分类Dev

Bootstrap Carousel 无响应(Jquery 放置正确)

来自分类Dev

Bootstrap Carousel没有显示在页面上

来自分类Dev

Bootstrap Carousel示例不显示文本

来自分类Dev

Twitter Bootstrap列不正确对齐

来自分类Dev

Bootstrap CSS格式不正确

来自分类Dev

Bootstrap 3列订购不正确

来自分类Dev

Bootstrap中div的大小不正确

来自分类Dev

Bootstrap div /行定位不正确

来自分类Dev

Bootstrap进度的动画比例不正确

来自分类Dev

Rails 5:Bootstrap 样式不正确

来自分类Dev

Bootstrap 4 容器宽度不正确

来自分类Dev

Bootstrap 3上的复选框在响应式布局中显示不正确

来自分类Dev

Bootstrap拆分按钮下拉菜单显示不正确

来自分类Dev

Bootstrap Navbar仅在一页上显示不正确

来自分类Dev

Ruby on Rails 设计 Bootstrap Recaptcha 错误在验证码失败时显示不正确

来自分类Dev

Bootstrap 日期选择器显示不正确的日期格式

来自分类Dev

使用react-bootstrap-carousel后未显示羽毛图标

来自分类Dev

Twitter Bootstrap Carousel显示两个项目

来自分类Dev

AngularJS + bootstrap carousel 帮助显示所有图片

来自分类Dev

使用ng-show时,ui-bootstrap选项卡显示不正确的选项卡内容

来自分类Dev

Bootstrap Carousel的问题

来自分类Dev

PHP与Bootstrap Carousel

来自分类Dev

复制Bootstrap Carousel箭头

来自分类Dev

复制Bootstrap Carousel箭头