[英]Why doesn't 100% width/height work on iPhone?
如果您有機會在手機中輸入http://toniweb.us/gm ,您將看到尺寸錯誤。
根據css:
html, body{
position:relative;
height:100%;
width:100%;
overflow-y:hidden;
}
它應該使用全部。
而且,我補充說:
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=1, minimum-scale=1, maximum-scale=2.0" />
但是我不確定這會影響什么。
此外,網站已優化為> = 1024像素。 有沒有辦法使iPhone適應這種情況? 也許通過某種方式擴展?
任何提示將非常有幫助。
嘗試過:
html, body{
position:absolute;
top: 0;
left: 0;
right: 0;
overflow-y: hidden;
}
我想上面的代碼就可以完成工作;)我認為您的目標是僅看到iphone上的灰色側邊欄,對嗎?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.