InterviewSolution
Saved Bookmarks
| 1. |
Does Bootstrap 3 used Flexbox? |
|
Answer» No, Bootstrap 4 came with the concept of Flexbox to HANDLE layout. Design flexible responsive layout structure using flexbox. The d-flex class is used in Bootstrap to set a flexbox container. LET us SEE an EXAMPLE wherein we are creating Flex Items: <!DOCTYPE html> <html lang="en"> <head> <title>Bootstrap Flexbox</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script> </head> <body> <div class="container mt-3"> <H2>Flex in Bootstrap</h2> <p>Here are the Flex items:</p> <div class="d-flex p-3 bg-primary text-white"> <div class="p-2 bg-info">Item 1</div> <div class="p-2 bg-warning">Item 2</div> <div class="p-2 bg-danger">Item 3</div> </div> </div> </body> </html>The following is the output: |
|