CSS3 self-adapting mobile phone screen [turn]

Source: Internet
Author: User

<!DOCTYPE HTML><HTML><Head><Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8" /><Metaname= "Viewport"content= "Width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/><title>Media Query Demos "CSS3 self-adapting phone screen"</title><styletype= "Text/css">. Wrapper{Border:Solid 1px #666;padding:5px 10px;margin:40px;}. Viewing-area span{Color:#666;Display:None;}/*Max-width*/@media screen and (max-width:600px){. One {background:#F9C; }span.lt600{Display:Inline-block; }}/*Min-width*/@media screen and (min-width:900px){. Both {background:#F90; }span.gt900{Display:Inline-block; }}/*Min-width & Max-width*/@media screen and (min-width:600px) and (max-width:900px){. Three {background:#9CF; }span.bt600-900{Display:Inline-block; }}/*Max Device Width*/@media screen and (max-device-width:480px){. iphone {background:#ccc; }}</style></Head><Body> <Divclass= "wrapper One">This box turns pink if the viewable area is less than 600px</Div> <Divclass= "wrapper ">This box will turn orange if the viewable area is less than 900px</Div> <Divclass= "wrapper three">This box will turn blue if the viewable area is 600px~900px</Div> </Body></HTML>

CSS3 self-adapting phone screen

http://hi.baidu.com/58zhongguo/item/c4da7bd761d22bc71a72b4d0?qq-pf-to=pcqq.c2c

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.