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