2011-03-16 7 views
2

私は同じページを表示すると、大体のハイパーリンクを持つ小さなhtmlページを持っています。これは、iphoneでそのhtmlページを見ると文字が非常に小さい&非常に読みにくい。HTMLページの自動サイジング

iphone &のコンピュータのWebブラウザで表示すると、同じHTMLが自動サイズに見えるようにするにはどうすればよいですか?

ありがとうございました。

答えて

0

モバイルCSSを作成する必要があります。

使用Mobile Device Detect PHPコード:

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

それはHTMLレベル@行うことThanks.Can't、私は私のプロジェクトでは、PHPを使用しないでください。 – Sharpeye500

+0

それは不可能で、[javascriptはお勧めできません](http://stackoverflow.com/questions/743129/mobile-detection-using-javascript/743139#743139) –

関連する問題