July 22 = 256-260

Source: Internet
Author: User

11.4.2 adjust the layout for the browser width

The following defines the CSS implementation page to display the default style in the browser and the browser with the page width greater than 1000px

The style displayed in the browser with the page width less than PX.

Code example:

// Set the mo Style

Xxdefaultcss {

By default, the XX element style is displayed on the page...

}

 

// Set the CSS style when the browser width is greater than 1000px

@ Media screen and (min-width: 1000px ){

XX element 1 {

XX element 1 style with a page width greater than 1000px...

}

XX element 2 {

The style of XX element 2 whose page width is greater than 1000px...

}

}

 

// Set the CSS style when the browser width is less than PX

@ Media screen and (max-width: 480px ){

XX element 1 {

The XX element 1 style with the page width less than PX...

}

XX element 2 {

The XX element 2 style with the page width less than PX...

}

}

 

 

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.