【问题标题】:Mobile Document Type Definition移动文档类型定义
【发布时间】:2011-11-29 23:34:36
【问题描述】:

移动网站未正确显示。即使我有正确的 DTD,我也必须放大才能正确查看我的网站:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" 
"http://www.wapforum.org/DTD/xhtml-mobile12.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>MySite Mobile</title>
<link rel="stylesheet" type="text/css" href="mobile.css"/>
</head>
<body>
<!-- content -->
</body>
</html>

我有正确的 DTD 吗?

【问题讨论】:

    标签: mobile dtd


    【解决方案1】:

    您缺少视口元标记。

    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    

    查看此链接https://developer.mozilla.org/en/Mobile/Viewport_meta_tag

    【讨论】:

      猜你喜欢
      • 2011-01-27
      • 2011-05-02
      • 2016-03-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多