How to Use CSS3 to implement responsive Web design and css3 to respond to web Design

Source: Internet
Author: User

How to Use CSS3 to implement responsive Web design and css3 to respond to web Design

How to implement responsive Web design through CSS3:

There are three steps: (1) Allow Automatic Webpage Width Adjustment. First, add the following line to the page header: <meta name = "viewport" content = "width = device-width, initial-scale = 1 "/> viewport is the default width and height of the webpage. The default width of the webpage is equal to the screen width (width = device-width ), in addition, the original scaling ratio (initial-scale = 1) is 1.0, that is, the initial page size accounts for 100% of the screen area. (2) stream layout. The absolute width layout and font size are not used, that is, in the Code of css, px (width: px) cannot be used when the width and height are defined. Only the percentage (width: %) or (width: auto) defines the height and width. The relative unit (em) is used to define the font size, and no absolute unit (px) is used ). (3) media query @ media only screen and (max-width: px) max-width is executed when the screen is smaller than or equal to the number (min-widt) it is executed when the screen is greater than or equal.

Related Article

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.