[英]Unable to prevent zoom on iPhone with initial-scale=1
我正在將以前固定寬度的設計轉換為響應式設計。
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
但是當我使用實際的 iPhone 進行測試時,有額外的寬度會導致水平滾動。
我究竟做錯了什么?
這里有兩個現場演示:
http://secretdesignproject.com/demo/ts/1/index.php/screen/index/941065
http://secretdesignproject.com/demo/ts/1/index.php/screen/index/691674
通常,您必須使用媒體查詢來補充您的響應式設計,並且您可以使用 css 限制瀏覽器行為,僅用於您的手機渲染
@media (max-width: 640px){
/*your css code here*/
}
嘗試一下...
祝你好運,
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.