通常:iPad Webアプリケーションでスクロールを無効にするにはどうすればよいですか?
document.body.addEventListener('touchmove',function(event){event.preventDefault();},false);
は私のために働いていません。私は私のiPad webappを可能な限りネイティブに感じさせようとしています。 答えは高く評価されます。
通常:iPad Webアプリケーションでスクロールを無効にするにはどうすればよいですか?
document.body.addEventListener('touchmove',function(event){event.preventDefault();},false);
は私のために働いていません。私は私のiPad webappを可能な限りネイティブに感じさせようとしています。 答えは高く評価されます。
body
ではなく、document
要素に直接そのハンドラを配置します。 jQueryを使って次に
<meta name="viewport" content="user-scalable=1.0,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
:
<link rel="stylesheet" type="text/css" href="css/main.css" media="all">
<link rel="stylesheet" type="text/css" href="css/landscape.css" media="all and (orientation:landscape)">
<link rel="stylesheet" type="text/css" href="css/portrait.css" media="all and (orientation:portrait)">
:
これはまた、あなたが異なる方位を処理する場合に有用であろう
は、私は次のようで成功を収めてきました可能な複製は[iPhone Webアプリケーションでのスクロールを無効にする]ですか?(http://stackoverflow.com/questions/2890361/disable-scrolling -in-an-iphone-web-application) – Gajus