Javascript-how to make the generated div adaptive mobile phone screen-php Tutorial

Source: Internet
Author: User
How to make the generated div adaptive mobile phone screen how to make the generated p adaptive mobile phone screen

Reply content:

How to make the generated p adaptive mobile phone screen

Use bootstrap to implement the responsive layout you need. col-xs -. col-sm -. col-md -. col-lg-. In addition, other labels can also implement responsive layout. for details, see http://www.runoob.com/bootstrap/bootstrap-grid-system.html. You can also use the Webapp framework, such as jQuery Mobile.

Set position to fixed, and then top and bottom give a fixed value.

The width and height of the write percentage, or the rem unit is used.

Notes for manual responsive layout:
1. the width is set to percentage and all values are floating. The height setting percentage is invalid.
2.css media query technology multiple links can be used to import your css code at various screen resolutions, but the number of requests is too large. it is not recommended. you can use @ media screen and (max-width = 375px) {The css code you need to render the style }. You can view the width of the device you want on the chrome console.
3. define viewport in meta to tell the html page that you want it to be adaptive
4. img uses max-width
5. use em for fonts

I am also a newbie. it is recommended that the lz system learn the responsive layout. otherwise there will be a lot of pitfalls, or you can simply use bootstrap to write a manual.

In my opinion, this question is: 'How to set a p to the screen size' in the browser is a problem.
In this case, I will do this:
googleOrbaiduBut it is bestgoogle=> Html-Set p width equal to window size-Stack Overflow

Here is a link:
Stackoverflow
Google

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.