简体   繁体   中英

website with flexible width for different mobile devices

I have a site where it is targeted to be used on different mobile devices. How I can set my site to adjust its width according to the device width on iPhone android, etc.. using css and Java script

tnx

Add this to html and adjust parameters.

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

More info on how to use Safari and iOS specific HTML tagshttp://developer.apple.com/library/safari/#documentation/appleapplications/reference/safariwebcontent/usingtheviewport/usingtheviewport.html

Sounds like responsive design! Have a look at some of the examples here: http://mediaqueri.es/ , using media queries in their css to change the look of the site depending on browser width.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM