"Graphic CSS3" Note 5 media and responsive design

Source: Internet
Author: User

Media Type: Media Type

A property in CSS2 that specifies the type of device that the page renders, commonly used:all, screen, print (printing), and multiple device types for projection, blind

Citation method:

1. <link> Tag: attribute name media= "screen";

2. @import mode: @import URL (xx.css) screen (for: CSS file to introduce another CSS or <style> tag)

3. @media Mode: @media screen {...} (Features in CSS3)

Media query: Press queries

CSS3 attribute, added new rule: Based on media type + CSS attribute rule definition

How to use:

1. <link> label <link media= "screen and (MIN-WIDTH:XXXPX)" >

2. Text mode: @media screen and (Min-width:xxxpx) {...}

An expression supports the following keywords:

Not

Only

The characteristics of responsive design: Grid layout (flexible layout), elastic image, flexible style

Content property values for viewport viewport in meta Tags: <meta name= "viewport" content= "..." >

Width=device-width, initial-scale=1.0, User-scalable=no

"Graphic CSS3" Note 5 media and responsive design

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.