Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Bootstrap 5 Display Inline-flex Classes</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"></script> </head> <body> <div class="m-4"> <h2>Display Inline-flex Classes</h2> <p>Use the d-inline-flex class to create a inline-flex container and transform direct children into flex items. You can also add breakpoints (sm, md, lg, xl, and xxl) to the classes (d-*-inline-flex) to control when the element should be a inline-flex container based on the screen width.</p> <div class="d-inline-flex bg-dark p-3"> <div class="p-2 bg-success">Flex item 1</div> <div class="p-2 bg-warning">Flex item 2</div> <div class="p-2 bg-danger">Flex item 3</div> </div> </div> </body> </html>