1
我有一個移動網頁,我已禁用水平滾動,因爲它干擾了我正在做的一些動畫。但是,當我在html和body上設置overflow-x:hidden
時,android由於某種原因失去了垂直滾動的功能。 iPad似乎仍然有效。我對Android 2.3的,如果它的事項Android瀏覽器禁用X滾動禁用Y滾動以及
這是問題的一些示例代碼:具有
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<style type="text/css">
html,body {
position:absolute;
height:100%;
width:100%;
padding:0px;
margin:0px;
overflow-x:hidden;
}
.content span {
white-space:nowrap;
display:block;
}
</style>
</head>
<body>
<div class="content">
<span>Really long line to force horizontal scrolling. Really long line to force horizontal scrolling. Really long line to force horizontal scrolling. Really long line to force horizontal scrolling. Really long line to force horizontal scrolling. Really long line to force horizontal scrolling. Really long line to force horizontal scrolling. Really long line to force horizontal scrolling.</span>
<span>1</span>
<span>2</span>
<span>3</span>
<span>4</span>
<span>5</span>
<span>6</span>
<span>7</span>
<span>8</span>
<span>9</span>
<span>1</span>
<span>2</span>
<span>3</span>
<span>4</span>
<span>5</span>
<span>6</span>
<span>7</span>
<span>8</span>
<span>9</span>
<span>1</span>
<span>2</span>
<span>3</span>
<span>4</span>
<span>5</span>
<span>6</span>
<span>7</span>
<span>8</span>
<span>9</span>
<span>1</span>
<span>2</span>
<span>3</span>
<span>4</span>
<span>5</span>
<span>6</span>
<span>7</span>
<span>8</span>
<span>9</span>
<span>1</span>
<span>2</span>
<span>3</span>
<span>4</span>
<span>5</span>
<span>6</span>
<span>7</span>
<span>8</span>
<span>9</span>
<span>1</span>
<span>2</span>
<span>3</span>
<span>4</span>
<span>5</span>
<span>6</span>
<span>7</span>
<span>8</span>
<span>9</span>
</div>
</body>
</html>