2016-09-07 6 views
2

私はメールで次のHTMLを送信PHPでスクリプトがあります(私はメインのdivを検査する場合)フレックスボックスのプロパティには、Gmailのメールに削除され

<html class="no-js" lang="en"> 
    <body> 
     <div style="width: 70%;background-color: #060b2b;margin: auto;flex-direction: column;display: flex;"> 

     <h1 style="margin-top: 50px;color: white;margin-left: auto;margin-right: auto;">Vous avez reçu une nouvelle notification.</h1> 

     <div style="width: 80%;padding: 50px;margin-top: 50px;background-color: #222;margin-left: auto;margin-right: auto;display: flex;"> 
      <p style="color:white;margin: auto;text-align: center;">{{$notification}}</p> 
     </div> 

     <a href="" style="margin-top: 50px;margin-bottom: 50px;margin-left: auto;margin-right: auto;color: white;padding:15px;background-color: #0E0E0E;">Accéder à mon compte</a> 
     </div> 
    </body> 
</html> 

しかし、電子メールが受信表示されませんがプロパティflex-direction: column;

Gmailはこれらのプロパティをフィルタしているようですか?

これは正常ですか?

答えて

3

HTML電子メールを設計することは、HTML Webサイトを設計することとは異なります。電子メールクライアントとWebブラウザの間には、技術的に大きなギャップがあります。それはブラウザが進化し続けているかのようですが、電子メールクライアントは1998年に詰まっています。

HTML電子メールの世界では、組み込みの外部スタイルが悪く、CSS3が悪く、JavaScriptが悪い、インラインスタイルレイアウト用のテーブルは良いです。この世界では、古い学校のコーディング方法が生きています。

GmailがCSS3のプロパティを削除することは驚くことではありません。あなたの最善の策は、テーブルとインラインスタイルに固執することです。


UPDATE:Gmail now supports embedded styles.


詳細情報:

+1

ありがとう、Michael_B! –

関連する問題