2011-01-11 28 views

答えて

5

ほとんどの電子メールクライアント(Outlookなど)は、標準に準拠していません。 CSS 2を完全にサポートしている人はいません。電子メールにCSSファイルを埋め込んだ人は誰も聞いたことがなく、可能であっても非常にクライアント間で互換性があるとは思えません。残念ながら、電子メールを使用する方法は、インラインスタイルの古い学校のHTML 4テーブルです。それ以上のものであれば、異なるクライアント間で大きな違いがあります。

0

はい。

私は.mhtmlファイルを次のように保存し、IEやOperaで開く場合は、少なくとも、それが動作:

MIME-Version: 1.0 
Content-Type: multipart/related; type="text/html";boundary="----boundary" 

------boundary 
Content-Disposition: inline; filename=test.html 
Content-Type: text/html; charset=utf-8; name=test.html 
Content-ID: <htmlid> 
Content-Transfer-Encoding: 8bit 

<!doctype html> 
<link rel="stylesheet" href="cid:cssid"> 
This should be red 

------boundary 
Content-Disposition: inline; filename=all.css 
Content-Type: text/css; charset=utf-8; name=all.css 
Content-ID: <cssid> 
Content-Transfer-Encoding: 8bit 

body{color: red} 

------boundary-- 

それは、それはまた、電子メールクライアントで動作します意味かどうかは別の問題ですしかし、私はそれが画像リンクではうまくいくが、CSSリンクではうまくいかないと思う。

関連する問題