現在、複数の画面サイズに対応するレイアウトを設計しようとしています。私が設計している画面サイズは以下のとおりです。
画面サイズ:
- 640×480
- 800×600
- 1024×768
- 1280x1024 (以上)
私が問題を抱えているのは、css3 メディア クエリを作成することです。これにより、ウィンドウの幅がこれらの幅のいずれかになるとレイアウトが変更されます。以下は、私が現在使用しているメディア クエリの例ですが、うまく機能しないので、誰かが修正を手伝ってくれるかどうか疑問に思っています。
<link rel="stylesheet" type="text/css" media="screen and (max-width: 700px)" href="css/devices/screen/layout-modify1.css">
<link rel="stylesheet" type="text/css" media="screen and (min-width: 701px) and (max-width: 900px)" href="css/devices/screen/layout-modify2.css">
<link rel="stylesheet" type="text/css" media="screen and (max-width: 901px)" href="css/devices/screen/layout-modify3.css">
新しい一連のメディア クエリを使用してみましたが、まだうまくいきません。誰かが私が間違っていることを説明してください。何人かはすでに説明しようとしましたが、私には理解できません。新しいメディア クエリを以下に示します。
<link rel="stylesheet" type="text/css" media="screen and (max-width: 640px)" href="css/devices/screen/layout-modify1.css">
<link rel="stylesheet" type="text/css" media="screen and (max-width: 800px)" href="css/devices/screen/layout-modify2.css">
<link rel="stylesheet" type="text/css" media="screen and (max-width: 1024px)" href="css/devices/screen/layout-modify3.css">
<link rel="stylesheet" type="text/css" media="screen and (max-width: 1280px)" href="css/devices/screen/layout-modify4.css">