HarmonyOS h5页面缩放问题

h5 文档user-scalable=‘no’ 头部不生效,页面缩放不受控制,若此属性不能用,请提供其他属性。

HarmonyOS
2024-09-05 10:22:21
3.0w浏览
收藏 0
回答 2
回答 2
按赞同
/
按时间
superinsect

示例如下:

<!DOCTYPE html> 
  <html> 
  <head> 
  <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,viewport-fit=cover"> 
  <title>2023年的每一天</title> 
  <style> 
  table { 
  width: 100%; 
  border-collapse: collapse; 
} 
th, td { 
  border: 1px solid black; 
  padding: 5px; 
  text-align: center; 
} 
</style> 
  </head> 
  <body style="background-color: #21A3A1;"> 
  <h1>2023年的每一天</h1> 
  <table> 
  <tr> 
  <th>日期</th> 
  </tr> 
  <script> 
  var start = new Date(2023, 01, 11); 
var end = new Date(2024, 0, 1); 
for(var d = start; d < end; d.setDate(d.getDate() + 1)) { 
  document.write("<tr><td>" + d.toISOString().slice(0,10) + "</td></tr>"); 
} 
</script> 
  </table> 
  </body> 
  </html>
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
分享
微博
QQ
微信
回复
2024-09-05 15:53:48
qq67905a942fc55

你好我也遇到了有解决办法吗

分享
微博
QQ
微信
回复
2025-01-22 10:40:48


相关问题
HarmonyOS webview H5页面事件监听
800浏览 • 1回复 待解决
HarmonyOS H5页面localstorage为null
585浏览 • 1回复 待解决
HarmonyOS H5页面加载缓存机制
906浏览 • 1回复 待解决
如何在HarmonyOS中调试h5页面
1434浏览 • 1回复 待解决
HarmonyOS Web组件加载在线H5页面
691浏览 • 1回复 待解决
HarmonyOS 通过webview改变H5页面字体
576浏览 • 1回复 待解决
如何使H5页面适配多设备?
1280浏览 • 1回复 待解决
HarmonyOS H5页面保存图片到本地相册
519浏览 • 1回复 待解决
HarmonyOS H5页面使用alert函数不生效
394浏览 • 1回复 待解决
HarmonyOSh5页面怎样判断当前环境?
556浏览 • 1回复 待解决
HarmonyOS h5页面是否可以适配Harmony OS
1030浏览 • 1回复 待解决
HarmonyOS 外部H5页面,拉起手机银行app
529浏览 • 1回复 待解决