防止某些页面元素在iOS上无法缩放

时间:2013-03-21 10:00:20

标签: iphone html ios ipad pinchzoom

我有一个基本的HTML页面,其中包含已修复的标题。当我在iPad或iPhone上捏合放大页面时,标题会从页面边缘流出,我无法拖动页面来查看全部内容。

我可以阻止整个页面进行缩放,但我希望这个固定标题不要缩放,并且页面的其余部分可以正常缩放。

有没有办法做到这一点?

编辑:

这是我的CSS / HTML

body {
    margin:0;
    padding:0;
}

.nozoom {
    width:100%;
    position:fixed;
    top:0px;
    margin:0 auto;
}

.nozoom > div {
    width:1008px;
    margin:0 auto;
    background-color:#444;
    height:100px;
}

.yeszoom {
    width:1008px;
    margin:100px auto 0;
    background-color:#096;
}

和...

<div class="nozoom"><div>This must not zoom and if you look carefully you'll see that you can never see the content of this which is completely over to the left - one two three four five six seven eight nine ten eleven twelve thirteen... dfgkjhdfsklhj dsfkjghl sdflghsdfklg sdfklg dsfkgh skdlfgh ksdlf ghskdlfgh jklsdfhg jklsdfg hsdfghj sdflkg hlsdf sdfg kljsdf jksdf sdfkjg sdfg ksdjfl gjkldsfg klsdfhgljksdf gsd kjlsdfh glskjdfhg jsdf hsdflk gsdf</div></div>
<div class="yeszoom">
<p>sdfgdsfgdsfgdfsga gsdf gsdf </p>
<p>fhgdfgh dffhgdfghdfgh dfg......</p>
<!-- Loads more content here-->
</div>

0 个答案:

没有答案