禁止关闭所有崩溃

时间:2019-05-11 11:00:23

标签: html bootstrap-4 collapse

我将此设置为有效,一切都很好。打开打开页面后,您可以单击第二个打开页面。很好,但是我想设置为禁止关闭所有功能。我希望总是打开一些文本框。

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<div class="container trainingss" id=myGroup>
  <p class="center">
    <a class="bg-button btn btn-dark btn-style-one" data-toggle="collapse" href="#collapseExample" role="button" aria-expanded="true" aria-controls="collapseExample">
                               Text1
                            </a>
    <button class="bg-button btn btn-dark btn-style-one" type="button" data-toggle="collapse" data-target="#collapseExample2" aria-expanded="false" aria-controls="collapseExample2">
                                text2
                            </button>
    <button class="bg-button btn btn-dark btn-style-one" type="button" data-toggle="collapse" data-target="#collapseExample3" aria-expanded="false" aria-controls="collapseExample3">
                            text3
                            </button>

  </p>

  <div class="collapse show" id="collapseExample" data-parent="#myGroup">
    <div class="card card-body">
      SOME TEXT1
    </div>
  </div>
  <div class="collapse" id="collapseExample2" data-parent="#myGroup">
    <div class="card card-body">
      SOME TEXT2
    </div>
  </div>
  <div class="collapse" id="collapseExample3" data-parent="#myGroup">
    <div class="card card-body">
      SOME TEXT3
    </div>
  </div>
</div>

0 个答案:

没有答案