-1

2つのcssファイルが必要なWebページがあります。ipadのサファリブラウザでWebページを開くとcss1が読み込まれ、ブラウザなしで直接開くとcss2が読み込まれます。Webページをブックマークすると、 ipadのホーム画面にあるアイコンをクリックすると、サファリブラウザのようにアドレスバーのないWebページが開き、アドレスバーのあるサファリでこれをオンラインにしたときに表示されないボタンのスペースが表示されます

     <link type="text/css" href="newstyle.css" media="only screen and (min-device-height:674px)and (min-device-width:1024px)  and (orientation:landscape)" rel="stylesheet"  />


      <link type="text/css" href="newstyle_1.css" media="only screen and (min-device-height:748px) and  (min-device-width:1024px)  and (orientation:landscape)" rel="stylesheet"/>
4

2 に答える 2

0

両方のためにそれらを一緒にマージしてみませんか?時間、労力、HTTPリクエストを節約できます。また、CSSコンプレッサーを使用しているときにも使用できるため、ダウンロード時間と帯域幅も節約できます。

于 2012-04-28T07:55:06.340 に答える
0

幅に基づいてこの方法を使用してください。問題を解決できます。この方法を使用しています

<link rel="stylesheet" media="screen and (max-width: 768x)" href="ipad.css" />

<link rel="stylesheet" media="screen and (max-width: 1024px)" href="desktop.css" />

<link rel="stylesheet"href="comon.css" />
于 2012-04-28T08:15:24.767 に答える