Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在加载一个 100% div 宽度的网页,但加载的页面比它在我的 WebView 中的大小要大。
有没有办法告诉网页设备只有一定的尺寸?
使用 html 元标记:
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scaleable=no" />
如果你想从 Obj-C 而不是 html 做类似的事情:
webView.scalesPageToFit = YES;