引导程序4:手风琴中的卡片标题不会使文本响应移动设备的大小

时间:2018-09-03 12:09:44

标签: html twitter-bootstrap bootstrap-4 bootstrap-accordion

我在引导程序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>

1 个答案:

答案 0 :(得分:1)

更改课程:

.btn {
    white-space: nowrap;
}

收件人:

.btn {
    white-space: normal;
}