如何使ipad/iphone的网页可滚动 [英] How to make a web page scrollable for ipad/iphone

查看:417
本文介绍了如何使ipad/iphone的网页可滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我必须为ipad/iphone制作网页的滚动视图.
怎么做.

谢谢

Hi All,

I have to make scrollable view of webpage for ipad/iphone.
How to do this.

Thanks

推荐答案

除非您使用绝对定位或固定定位,否则网页始终可以滚动 滚动.因此,如果您想在屏幕尺寸截然不同的设备上显示应用程序,只需建议不使用这样的定位.

参见:
http://webdesign.about.com/od/advancedcss/a/aa061307.htm [ ^ ],
http://www.w3schools.com/css/css_positioning.asp [
一种有趣的技术是在相对定位中使用绝对定位:
http://css-tricks.com/791-absolute-positioning-inside-relative-positioning// ^ ].不过,请务必小心使用.

—SA
A Web page is always scrollable unless you use absolute or fixed positioning. So you would simply recommend not using such positioning if you want to show your application on devices of very different screen sizes.

See:
http://webdesign.about.com/od/advancedcss/a/aa061307.htm[^],
http://www.w3schools.com/css/css_positioning.asp[^].

There are a number of CSS methods helping to stretch your components to occupy the width of a Web browser screen. A basic hint: use "width: 100%".

One interesting technique is using absolute positioning inside relative positioning: http://css-tricks.com/791-absolute-positioning-inside-relative-positioning/[^]. Still, use it with great care.

—SA


这篇关于如何使ipad/iphone的网页可滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆