【发布时间】:2016-11-27 20:12:12
【问题描述】:
我创建了以下 html 页面:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<meta name="viewport" content="width=device-width" />
<style>
@media only screen and (max-width: 320px)
{
.text
{
font-size:0.3em;
}
}
@media only screen and (min-width: 321px) and (max-width: 480px)
{
.text
{
font-size:0.6em;
}
}
@media only screen and (min-width: 481px) and (max-width: 600px)
{
.text
{
font-size:0.9em;
}
}
@media only screen and (min-width: 601px) and (max-width: 768px)
{
.text
{
font-size:1.2em;
}
}
@media only screen and (min-width: 769px) and (max-width: 1024px)
{
.text
{
font-size:1.5em;
}
}
@media only screen and (min-width: 1025px) and (max-width: 1200px)
{
.text
{
font-size:1.8em;
}
}
@media only screen and (min-width: 1201px)
{
.text
{
font-size:2em;
}
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div class="text">
text text text text
</div>
</form>
</body>
</html>
当我使用浏览器默认步骤(100%、110%、125%...)从 100% 放大到 500% 时,字体大小在最初的几个步骤中会增加,然后在以下一些步骤中会减小以不一致的方式。这发生在所有主要浏览器中: - 铬 51.0.2704.103 - 即 11 - 火狐 43.0.1 任何帮助将不胜感激 谢谢
【问题讨论】:
标签: html css media-queries font-size zooming