开发者

website with flexible width for different mobile devices

开发者 https://www.devze.com 2023-03-06 17:50 出处:网络
I have a site where it is targeted to be used on d开发者_StackOverflow中文版ifferent mobile devices. How I can set my site to adjust its width according to the device width on iPhone android, etc.. us

I have a site where it is targeted to be used on d开发者_StackOverflow中文版ifferent 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消