开发者

Auto sizing of HTML page

开发者 https://www.devze.com 2023-02-17 12:40 出处:网络
I have a开发者_高级运维 small html pages with lot of hyper links, when i view the same page is web browser on a computer that looks okay, when i view that html page in iphone, the letters are very tin

I have a开发者_高级运维 small html pages with lot of hyper links, when i view the same page is web browser on a computer that looks okay, when i view that html page in iphone, the letters are very tiny & very difficult to read.

How to make that the same HTML looks auto sized if you view in iphone & web browsers in computers?

Thanks.


You have to make a mobile css.

Use Mobile Device Detect php code as :

require_once('mobile_device_detect/mobile_device_detect.php');

$mobile = mobile_device_detect(true,false,true,true,true,true,true,false,false);

echo ($mobile) ? '<link rel="stylesheet" media="all" href="css/mobile.css" /><meta content="True" name="HandheldFriendly" /><meta content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" name="viewport" />' : '<link rel="stylesheet" media="all" href="css/main.css" />';

echo '<body'.($mobile ? 'onload="window.scrollTo(0, 1)"' : null).'>' ;
0

精彩评论

暂无评论...
验证码 换一张
取 消