Mobile Project Development Summary

Source: Internet
Author: User

For this mobile page development, a lot of new contacts, the first one is the responsive layout, in mobile page development, you need to consider the mobile side of a variety of different screen sizes and use different layouts to show the desired effect. In a small screen mobile device. You may need to reduce the amount of information in the page, and change the original layout scheme, adopt the layout scheme which is suitable for the mobile end. In a medium-sized mobile device, such as a tablet, you need to consider the layout of a horizontal screen, vertical screen, and so on. Born out of these demands is the so-called responsive layout solution, The responsive layout is focused on using media queries to use different CSS styles for devices of different screen sizes, in which case you can directly adapt to devices of different screen sizes without having to write different pages for different devices. Just need an HTML file and a CSS file to do it. To use a responsive layout, you first need to set the viewport in the Metadata tab in the header of the page and set the parameters that are required for the responsive layout. " Viewport "When set up, you can write media queries in CSS to use different layout schemes for devices of different screen sizes.
1 <!DOCTYPE HTML>2 <HTMLLang= "en">3 <Head>4     <MetaCharSet= "UTF-8">5     <Metaname= "Viewport"content= "Width=device-width,maximum-scale=1,user-scalable=no">6     <title>Title</title>7     <styletype= "Text/css">8 Div{width:200px;Height:200px;margin:200px Auto;Background-color:Pink;}9 @media (min-width:768px) and (max-width:1024px){Ten Div{background-color:Beige;} One         } A @media (max-width:768px){ - Div{background-color:Chocolate;} -         } the     </style> - </Head> - <Body> - <Div></Div> + </Body> - </HTML>

Mobile Project Development Summary

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.