Load style sheets for different screens

Source: Internet
Author: User

<link href= "extra-small.css" rel= "stylesheet" media= "screen and (max-width:390px)"/>
<link href= "small.css" rel= "stylesheet" media= "screen and (min-width:391px) and (max-width:500px)"/>
<link href= "medium.css" rel= "stylesheet" media= "screen and (min-width:501px) and (max-width:767px)"/>
<link href= "large.css" rel= "stylesheet" media= "screen and (min-width:768px)"/>For each different screen, choose a different style sheet

In the responsive layout, you can discard without reservation:

First, as little as possible with insignificant div;

Second, do not use inline elements (inline);

thirdly, use JS or flash as little as possible;

Four, Discard unused absolute positioning and floating styles;

Five, discard any redundant structures and do not use the 100% setting.

Have to have, discard some of the responsive have influence of East, then what can help responsive to determine a better layout ?

First, the use of HTML5 DOCTYPE and related guidelines;

Second, Reset your style (RESET.CSS);

Thirdly, a simple semantic core layout;

Four, use simple techniques for important page elements, such as navigation menu elements.

Using these tips is nothing more than keeping your HTML simple and clean, and the key parts of your page layout (elements) do not rely too much on modern techniques, such as CSS3 effects or JS scripts.

Say so much, what kind of layout or HTML structure is simple and clean? Here we teach you a quick test method. You first ban all the styles (and information related to styles) in your page, open them in your browser, and if your content is organized and easy to read, then your structure will not go any worse.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Load style sheets for different screens

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.