Android上使用谷歌浏览器的奇怪html渲染

时间:2015-01-23 08:26:44

标签: android html google-chrome

这个非常简单的html文件

<!DOCTYPE html>
<html>
<head>
<title>My Page</title>
</head>

<body>
    <h1>Header</h1>
    <p>Paragraph with some text. Paragraph with some text. Paragraph
        with some text. Paragraph with some text. Paragraph with some text.</p>
    Label: <input type="text"> <br /> 
    <input type="submit" value="Button">
    <p>Paragraph with some text. Paragraph with some text. Paragraph
        with some text. Paragraph with some text. Paragraph with some text.</p>
</body>
</html>
在Android 4.1.2上的谷歌浏览器中显示

,“Label:”和输入字段的字体非常小。

如何使标签和段落具有相同的字体大小?

即使我为所有部件指定 style =“font-size:24px”(标签和输入包装为“p”),标签和输入仍然会显示更小的字体尺寸。您可以在此处进行测试:link to the above html

screenshot

P.S。在两个“p”中放入较少的文本使其正常工作。

1 个答案:

答案 0 :(得分:4)

将此添加到头

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