0

我有一个问题,内容 div 中的文本是可滚动的。在 iOS 6 和 iPhone 4 上发生,并且仅在设置了本机标题时发生。

视频:http ://www.youtube.com/watch?v=8ARaDQzBqOM

演示:

<!DOCTYPE html> 
<html>
    <head>
    <script>
    forge.topbar.setTitle('Test App', function() {
        forge.logging.log("Topbar image set");
        }, function(e) {
        forge.logging.log("Topbar image error: " + e);
    });
    </script>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    <title>Single page template</title> 
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
    <script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
    <script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
</head> 

<body> 
    <div data-role="page">
        <div data-role="content">   
            <p>this text is scrollable</p>
        </div>
    </div>
</body>
</html>
4

1 回答 1

1

您可能想尝试使用 CSS 重置所有元素的所有边距、填充和边框。在结束之前添加这个</head>

<style type="text/css">    
  * { /* reset */
    margin: 0;
    padding: 0;
    border: 0;
  }
</style>
于 2012-10-16T07:08:09.113 回答