手机网站中的小字体 [英] Small fonts in mobile website

查看:94
本文介绍了手机网站中的小字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发了一个移动网站,并且可以在Android和iPhone仿真器中完美显示.但是,当我尝试在Android手机或IPhone上查看该网站时,它会将网站显示为在手机上查看的普通桌面网站,但宽度很大,字体却很小.如果我在屏幕上双击/轻按,该问题将得到解决.

I have developed a mobile website and it shows perfectly to me in Android and IPhone emulator. However, when I try to view it on an Android phone or IPhone, it displays the website as a normal desktop website viewed on phone with very high widths and fonts appearing very small. The issue gets resolved, if I double click/tap on my screen.

任何帮助将不胜感激.

我在 stackoverflow 上得到了这个.但对此不太确定

I got this on stackoverflow..but not much sure about it

推荐答案

您需要添加一个名为"viewport"的元标记,请参见下面的示例

You need to add a meta tag named "viewport" see sample below

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="Content-Style-Type" content="text/css">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1" />
</head>
<body style='background-color:white;font-family:Arial,Tahoma,Verdana;'>
</body>
</html>

这篇关于手机网站中的小字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆