InterviewSolution
Saved Bookmarks
| 1. |
Collapse - Bootstrap |
||||||
|
Answer» With JavaScript plugins, you can change the visibility of content across your project with the help of collapse. Example: <!DOCTYPE html><html lang="en"> <head> <title>collapse in bootstrap</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script> </head> <body> <div class="container mt-3"> <h2>collapse in bootstrap</h2> <p>Click on the button to toggle between showing and hiding content.</p> <button type="button" class="btn btn-primary" data-bs-toggle="collapse" data-bs-target="#demo">Simple collapsible</button> <div id="demo" class="collapse"> Learn bootstrap </div> </div> </body> </html>
|
|||||||