css014 Responsive web Design

Source: Internet
Author: User

css014 Response Type Web Design

First, Response Type Web basic knowledge of design

1, RWD three ideas: A, for the layout of the elastic network, B, for pictures and video of the elastic Media, C, for different screen width created by different styles of CSS media query.

Second, to be RWD Building Web pages

1, mobile browser in order to ignore the mobile browser screen smaller font also become smaller behavior, you can add a line of code in the head:

<meta name= "viewport" content= "Width=vedice-width" >

It is best to add before <title></title>.

Third, Media Enquiry

1. Strategies for using Media queries

Adjustment column: Adjust the column to the number of mobile phone adaptation;

Elastic width: On the phone, the width is best set to auto or 100%

Compact white space: use margin and padding to reduce white space and avoid layout fragmentation

Adjust font size: Adjust font size appropriately

Modify the navigation menu: use JavaScript to dynamically turn the navigation bar into a drop-down menu.

To hide content on a handheld device:

Use background Image:

2. Create breakpoints

3. Create Media queries

4. Include the query in the style sheet

A. Using the @import directive

@import URL (css/small.css) (max-width:320px);

B. Embed media queries in style sheets

@media (max-width:480px) {

body{

/*style Properties Go here*/

}

. style{

/*style Properties Go here*/

}

}

Four, Elastic Mesh

Importance of HTML source code order

Resetting the box model

Convert fixed width to elastic mesh

Five, Streaming Pictures

1. Add the following styles to the style sheet

img{

max-width:100%;

}

2. Find each tag in Ⅱ, delete the height and Width properties

css014 Responsive web 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.