Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Bootstrap4 Collapse

Bootstrap4 Collapse

Bootstrap4 Collapse makes it easy to show and hide content.

Example

<button data-toggle="collapse" data-target="#demo" Collapse button>
<div id="demo" class="collapse">

Lorem ipsum dolor text....

div

Try it »

Example Parsing

The .collapse class is used to specify a collapsible element (the

in the example); clicking the button toggles between hidden and shown.

To control the hiding and showing of content, you need to add the or