Auto sizing of HTML page
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).'>' ;
精彩评论