-5

我想为手机制作网站如何使字体大小随着手机屏幕的分辨率而延伸

<!DOCTYPE html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
p{font-size:1em;
/* font-size:20px; */
}
</style>
</head>

<body>

<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard 
dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has s
urvived not only five centuries, but also the leap into electronic  .
</p>

</body>
</html>
4

2 回答 2

3

使用em而不是px

例子:

font-size: 1.1em;
于 2013-04-01T10:36:32.790 回答
0

将元数据放在标题部分。

<meta name="viewport" content="width=device-width, initial-scale=1">
于 2013-04-01T10:46:21.557 回答