- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
目前尝试让 Accordion 项目在 Bootstrap 中工作一切都很好,直到我尝试关闭所有 Accordion 菜单。突然之间,标题比未折叠时小得多。
我正在使用指南提供的默认 html 数据,我的代码是这: https://pastebin.com/MhvXunN3
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<div class="accordion" id="accordionExample">
<div class="card">
<div class="card-header" id="headingOne">
<h2 class="mb-0">
<button class="btn btn-link" type="button" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
Collapsible Group Item #1
</button>
</h2>
</div>
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordionExample">
<div class="card-body">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird
on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table,
raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</div>
</div>
</div>
<div class="card">
<div class="card-header" id="headingTwo">
<h2 class="mb-0">
<button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
Collapsible Group Item #2
</button>
</h2>
</div>
<div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionExample">
<div class="card-body">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird
on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table,
raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</div>
</div>
</div>
<div class="card">
<div class="card-header" id="headingThree">
<h2 class="mb-0">
<button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
Collapsible Group Item #3
</button>
</h2>
</div>
<div id="collapseThree" class="collapse" aria-labelledby="headingThree" data-parent="#accordionExample">
<div class="card-body">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird
on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table,
raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</div>
</div>
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
指南中的代码可以在这里找到: https://getbootstrap.com/docs/4.3/components/collapse/#accordion-example
有没有人看到我在这里做错了什么,这让我发疯......
最佳答案
您必须在 .col-12
中使用一列 ( .row
)解决这个问题。只需将 .accordion
进入一个新的<div>
类元素 .col-12
像下面这样:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<title>Hello, world!</title>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-12">
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Quisquam laboriosam magni mollitia culpa illum doloremque corporis quod quae libero obcaecati? Quam nulla sapiente a voluptatum eos impedit iusto dicta obcaecati. Lorem ipsum dolor sit amet consectetur adipisicing elit. Ullam error voluptate recusandae adipisci quidem. Dolorem, ipsum adipisci ea tenetur eligendi nisi necessitatibus nostrum? Provident maxime iure molestiae impedit, unde dolorem.</p>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="accordion" id="accordionExample">
<div class="card">
<div class="card-header" id="headingOne">
<h2 class="mb-0">
<button class="btn btn-link" type="button" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
Collapsible Group Item #1
</button>
</h2>
</div>
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordionExample">
<div class="card-body">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</div>
</div>
</div>
<div class="card">
<div class="card-header" id="headingTwo">
<h2 class="mb-0">
<button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
Collapsible Group Item #2
</button>
</h2>
</div>
<div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionExample">
<div class="card-body">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</div>
</div>
</div>
<div class="card">
<div class="card-header" id="headingThree">
<h2 class="mb-0">
<button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
Collapsible Group Item #3
</button>
</h2>
</div>
<div id="collapseThree" class="collapse" aria-labelledby="headingThree" data-parent="#accordionExample">
<div class="card-body">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
</body>
</html>
In a grid layout, content must be placed within columns and only columns may be immediate children of rows.
source: https://getbootstrap.com/docs/4.3/layout/grid/#how-it-works
关于html - 全部关闭时,Bootstrap Accordion header 较小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55457085/
是否可以告诉hive某个表“很小”,即应将其复制到所有节点并在RAM中进行操作? 最佳答案 尝试以下提示: /*+ MAPJOIN(small_table) */ UPDATE 顺便说一句,还有其他
给定的是一个大(但不是巨大)的字符串数组(数量为 1000-5000 个单个字符串)。我想对这些字符串执行一些计算和其他操作。因为在处理那个大数组时它总是停止工作,所以我重写了我的函数以递归地获取较小
当我在大小为 (640,480) 的 JFrame 中添加 JPanel 时,JPanel 的大小为 (638449)。我需要 JPanel 与 JFrame 完全匹配! 我发现的一个临时解决方法是将
我目前正在尝试响应设计。我需要在父 div 变小的同时保持图像居中。 见图片说明: 我不想用它作为背景。下面的代码会一直把它放在div框的左上角 #img_wrap {
当我必须捕获生成器中可能发生的异常时,如何使 try block 尽可能小? 典型的情况是这样的: for i in g(): process(i) 如果 g() 可以引发我需要捕获的异常,第一种
目前尝试让 Accordion 项目在 Bootstrap 中工作一切都很好,直到我尝试关闭所有 Accordion 菜单。突然之间,标题比未折叠时小得多。 当一个打开时 当全部关闭时 我正在使用指南
目前尝试让 Accordion 项目在 Bootstrap 中工作一切都很好,直到我尝试关闭所有 Accordion 菜单。突然之间,标题比未折叠时小得多。 当一个打开时 当全部关闭时 我正在使用指南
一个应用程序托管一个具有三个接口(interface)的 Web 服务,用于三个单独且独立的操作,所有这些操作都在应用程序的不同组件中实现,彼此独立,例如在不同的包等中,所以他们对彼此了解不多,只共享
我正在尝试使用 border-radius 属性设计一个主要内容容器具有圆 Angular 的网站。但是,我保持侧边栏和顶部导航栏固定,因此当用户向上或向下滚动时它们不会移动。它类似于在 Google
我正在构建我网站的响应式版本。 虽然我很高兴大多数 float 的 div 被迫在屏幕下方,但有一些 div 我需要保持彼此相邻,即使屏幕区域小于这些 div 的总宽度。在这种情况下,我想按比例缩小它
我正在为我的元素使用 Twitter Bootstraps 网格。我有以下 HTML: Some text Some text
我有一个小宽度的 div 并且可以看到溢出。我有一个更大的表,里面只有一个单元格和一个文本: A small text with spaces...
我有一个设计得很好的架构,其中 Controller 转到访问与数据库通信的存储库的服务。 因此, Controller 中的逻辑保持在最低限度,但我仍然有非常微妙的代码片段来执行一些任务,例如 验证
我在一个布局中有两个 View 。我将分别称它们为 View A 和 View B。 ┌──────┐ │┌─┐┌─┐│ ││A││B││ │└─┘└─┘│ └──────┘ 父布局(包括View A
整个页面的父元素是一个居中的 div,最大宽度限制为 960px。页面上的所有其他元素都是该父 div 的子元素。简化结构如下: 虽然父 div 的宽度不应超过 960px,但我
我应该链接到完整的 jQuery UI -还是-提供精简的自定义副本? 来自 Google 等 CDN 的完整 jQuery-UI 与提供定制的最小版本之间存在非常显着的大小差异。此外,还可以将 jQ
我正在尝试制作一条图像拇指的“线”,它在鼠标移动时滚动。我让它工作了,但我现在的问题是我想在侧面做一个“填充”,这样我就不必将鼠标一直拉到侧面才能看到第一个/最后一个拇指。但我真的无法让它工作:/ 这
我是一名优秀的程序员,十分优秀!