|  Mac版Internet Exporerと、それ以外でスタイルを分ける | 
| Internet Explorer | Netscape Navigator | iCab | Safari | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 3.0x | 4.0x | 4.5 | 5.0x | 5.5 | 6.0 | 2.0x | 3.0x | 4.0x | 4.x | 6.0 | 7.0 | 2.x | 1.x | |
| Windows | × | ○ | - | ○ | ○ | ○ | × | × | ○ | ○ | ○ | ○ | - | - | 
| Macintosh | × | × | × | ○ | - | - | × | × | ○ | ○ | ○ | ○ | ○ | ○ | 
| UNIX | - | - | - | - | - | - | × | × | ○ | ○ | ○ | ○ | - | - | 
| ポイント | MacIEも含む全てのブラウザでのスタイル定義 /* \*/ Mac+IE以外でのスタイルを定義(ここはMac+IEは無視される) /* */ | 
|---|---|
| 説 明 | Mac版Internet Explorerと、それ以外のブラウザで分けるには\記号を利用します。 | 
| サンプル | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> <html> <head> <title>Mac+IE対策</title> <style type="text/css"><!-- .type1 { margin:10px; padding:15px; border:5px red solid; width:400px; /* \*/ border:5px blue solid; /* */ } --></style> </head> <body> <div class="type1"> Macintosh + Internet Explorerでは枠の色が赤色で表示されます。それ以外のブラウザでは枠の色は青色で表示されます。 </div> </body> </html> | 
| 補足説明 | なし | 
| ■サンプルを実行する >>実行 ■各ブラウザでの動作結果を見る >>View! |