1
我發現iOS設備上顯示Google Apps腳本HtmlService的問題。如果html的內容高於視口的高度,則iOS設備不啓用滾動。有什麼辦法可以強制這個嗎?以下代碼將重現iOS設備上的問題。Google Apps腳本中iOS視口的問題
function doGet() {
return HtmlService.createTemplateFromFile('html')
.evaluate().setSandboxMode(HtmlService.SandboxMode.IFRAME).addMetaTag("viewport", "width=device-width,initial-scale=1").setTitle("Whatever")
}
"html" file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Prep Notes Viewer-Editor</title>
<link type="text/css" rel="stylesheet" >
</head>
<body>
<div id="output">
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Line <br>
Last Line
</div>
</body>
</html>
你應該公佈你的腳本,並給每個人的匿名訪問,並張貼喜歡這裏,使人們可以測試它。 –
這是一個鏈接。 https://script.google.com/d/1j2I3Gr6qXbN5PQjq4tBIb2dex4mVkNRYBLf5mLiCWCVlFYi2-MC7QY9Y/edit?usp=sharing – user2970721