Home > Web Front-end > HTML Tutorial > Common interview questions for bootstrap (summary)

Common interview questions for bootstrap (summary)

青灯夜游
Release: 2018-10-13 17:12:45
forward
7345 people have browsed it

This article summarizes some common bootstrap interview questions for you. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you. If you want to learn and get more bootstrap related tutorials, you can also visit: bootstrap tutorial!

1. Why use bootstrap?

Bootstrap has the advantages of mobile device priority, good browser support, easy to use, responsive design, etc. So Bootstrap is widely used.

2.Add the viewport meta tag in the head

In order to make the website developed by Bootstrap mobile-friendly and ensure proper drawing and touch screen scaling, it is necessary Add the viewport meta tag to the head of the web page, and the

width attribute controls the width of the device. Assuming that your website will be viewed on devices with different screen resolutions, setting it to device-width will ensure that it renders correctly on different devices.

iinitial-scale=1.0;Ensure that when the web page is loaded, it will be rendered at a 1:1 ratio without any scaling.

On mobile browsers, the zooming functionality can be disabled by adding user-scalable=no to the viewport meta tag.

Normally, maximum-scale=1.0 is used with user-scalable=no. After disabling the zoom function, users can only scroll the screen, which can make your website look more like a native application, so add the following code:

<metaname="viewport" content="width=device-width,initial-scale=1">
Copy after login

3. For various sizes For devices, what are the class prefixes set by Bootstrap?

Extra small device phones (<768px): .col-xs-

Small device tablets (>=768px): .col-sm-

Medium Device Desktop (>=992px): .col-md-

Large Device Desktop (>=1200px): .col-lg-

4 .How to set up a responsive table in Bootstrap?

Add class="table-responsive"

5. What are the basic steps to create a vertical form using Bootstrap?

(1) Add role="form" to the parent

element;

(2) Place the label and control in a group with class="form-group " in

, which is necessary to obtain optimal spacing;

(3) Add class=" to all text elements ,