iPhone用にスタイルシートを振り分けるには

iPhone用にスタイルシートを振り分けるには、画面サイズによる振り分けで対処できます。
画面サイズがiPhoneは480px以下、PCは481px以上であることを利用します。

iPhone用の指定

<link media="only screen and (max-device-width:480px)"
href="iphone.css" type="text/css" rel="stylesheet"/>

PC用の指定

<link media="screen and (min-device-width:481px)"
href="pc.css" type="text/css" rel="stylesheet"/>

Internet Explorer(IE)用の指定

<!--[if IE]>
<link rel="stylesheet" type="text/css" href="ie.css" />
<![endif]-->

iui - Google Code

関連記事

スポンサーリンク

$plugins_dirクラス変数 プラグインを置くディレクトリ

ホームページ製作・web系アプリ系の製作案件募集中です。

上に戻る