0

This is part of my html:

<body>
    <div id="intro" class="page">
        <div id="slider">
            <div>
                <img src="img/image1.png">
            </div>
            <div>
                <img src="img/image2.png">
            </div>
            <div>
                <img src="img/image3.png">
            </div>
            <div>
                <img src="img/image4.png">
            </div>
        </div>
    </div>
<body>

I set

body{height:100%} 
#intro{height:100%}

and in config.xml

<preference name="DisallowOverscroll" value="true" />

But there's still vertical scrollbar and it can scroll down a little bit. It seems that the lenght of distance scrolled is twice of the height of the iPhone status bar on the top.

Any ideas?

UPDATE: I hide the status bar with [[UIApplication sharedApplication] setStatusBarHidden:YES]; but no help.

4

2 回答 2

0

访问主视图并设置溢出属性

.view
{
overflow-y:hidden !important;
}
于 2013-07-09T11:09:35.023 回答
0

我重置了视图框架,它可以工作:

CGRect screenBounds = [[UIScreen mainScreen] bounds];
self.viewController.view.frame = CGRectMake(0,20,320,screenBounds.size.height);
于 2013-07-10T11:10:43.813 回答