OGeek|极客世界-中国程序员成长平台

标题: html - iphone上的网站真的很小 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 17:16
标题: html - iphone上的网站真的很小

所以我将网站推送到 http://austinenl.com但是,在 iPhone 上,它似乎真的缩小了。根据我的研究,我需要添加

  <meta name="viewport" content="width=device-width; initial-scale=1.0;">

但是,添加此内容后,我仍然收到有关该网站在 iphone 上看起来很糟糕的报告。我找不到任何其他来源可以就导致此问题的原因提供任何其他建议,所以我希望这里有人可以提供帮助。

iphone output



Best Answer-推荐答案


而不是使用:<meta name="viewport"content="width=device-width; initial-scale=1.0;">,它使用分号。

您可以尝试使用:<meta name="viewport"content="width=device-width, initial-scale=1">,它使用逗号。

如果多年来一直使用第二个选项并且一切正常。这就是苹果想要的方式。见 Supported Meta Tags.

编辑:我检查了你的 CSS,发现了一些我不确定它们的用途的规则,但删除它们似乎有帮助。

.area-checkboxes {
  display: -webkit-flex;
}

.area-checkbox {
  min-width: 250px;
  -webkit-flex: 1 1 250px;
  flex: 1;
}

两者都在 style.css

中找到

关于html - iphone上的网站真的很小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33861468/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://sqlite.in/) Powered by Discuz! X3.4