How to adapt bootstrap

藏色散人
Release: 2019-07-16 11:07:20
Original
2414 people have browsed it

How to adapt bootstrap

How to adapt bootstrap

bootstrap screen adaptation

In order to make the website developed by Bootstrap mobile-friendly and ensure proper drawing and touch screen scaling, you need to add the viewport meta tag in the head of the web page, as shown below:

<meta name="viewport" content="width=device-width, initial-scale=1.0">
Copy after login

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

initial-scale=1.0 ensures that when the web page is loaded, it is rendered at a 1:1 ratio without any scaling.

On mobile browsers, you can disable zooming by adding user-scalable=no to the viewport meta tag.

Normally, maximum-scale=1.0 is used with user-scalable=no. By disabling zoom, users can only scroll, making your website look more like a native app.

<meta name="viewport" content="width=device-width, 
                                     initial-scale=1.0, 
                                     maximum-scale=1.0, 
                                     user-scalable=no">
Copy after login

Related recommendations: "bootstrap tutorial"

The above is the detailed content of How to adapt bootstrap. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!