html - Bootstrap 4:手风琴中的卡片标题不会使文本响应移动大小
问题描述
我在 bootstrap 4 中有一个手风琴。卡片标题中的文本没有响应,所以当它的长度大于卡片标题的宽度时,它会显示在外面。
<div class="card">
<div class="card-header" id="headingEight">
<h5 class="mb-0">
<button class="btn btn-link collapsed" data-toggle="collapse" data-target="#collapseEight" aria-expanded="false" aria-controls="collapseEight">
<p>1. Header which is not responsive so in mobile it does not display right</p>
</button>
</h5>
</div>
<div id="collapseEight" class="collapse" aria-labelledby="headingEight" data-parent="#accordion">
<div class="card-body text-justify">
Text here is responsive
</div>
</div>
</div>
解决方案
换班:
.btn {
white-space: nowrap;
}
至:
.btn {
white-space: normal;
}
推荐阅读
- c++ - 包含带有 clang 格式的转发标头的顺序
- javascript - 在按钮单击事件上通过 Ajax 上传文件并发布表单
- python - 如何将日期与熊猫中的字符串进行比较?
- html - 数字卡显示垂直而不是水平
- javascript - app.ts 未在 plunkr 上呈现
- android - 从内存 Android Studio 获取图像时出错
- java - 尝试输入整数值时 System.in.read() 行为不端
- php - simpelXMLElement 属性命名空间
- jquery - 如何使用 JQuery 获得第一个孩子的身高?
- c# - Aspose.Cells:初始化空工作簿,workbook.Worksheets[0].Cells 里面没有单元格