Learn Mobile page making 5

Source: Internet
Author: User

Use Padding-bottom for highly adaptive

1 <!DOCTYPE HTML>2 <HTMLLang= "zh">3 <Head>4     <MetaCharSet= "UTF-8">5     <title>Height Auto</title>6     <!--Join Meta Viewport -7     <Metaname= "Viewport"content= "Width=device-width, User-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">8     <style>9     *{Ten padding:0; One margin:0; A     } - #box{ - Height:45px; the width:100%; - background:#f30; - Display:-webkit-box; - position:relative; +     } - #logo{ + width:100px; A background:#f00; at Height:45px; - Display:Block; -  -  -  -     } in #nav{ - -webkit-box-flex:1; to -moz-box-flex:1; + -ms-box-flex:1; - Box-flex:1; the     } * #btn{ $ width:50px;Panax Notoginseng background:Blue; -     } the . List{ + width:100%; A          the     } + . List ul{ - Display:-webkit-box; $ List-style-type:None; $     } - . List Li{ - -webkit-box-flex:1; the -moz-box-flex:1; - -ms-box-flex:1;Wuyi Box-flex:1; the background:#eee; - width:30%; Wu Margin-right:3%; -         /*set Height to 0 padding-bottom:30% reference is also the height of the Father*/ About Height:0; $         /*picture height of the width/height* area*/ - Padding-top:30%; -     } -     </style> A </Head> + <Body> the <!--H1 inside write words with text-indent use SEO - -     <DivID= "box"> $         <DixID= "logo">Logo</Dix> the         <DivID= "NAV"></Div> the         <DivID= "BTN"></Div> the     </Div> the     <Divclass= "List"> -         <ul> in             <Li><imgsrc=""alt=""></Li> the             <Li></Li> the             <Li></Li> About         </ul> the     </Div> the </Body> the </HTML>

Learn Mobile page making 5

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.