2016-09-19 39 views
0

不靈根據最新的Gmail文檔,內嵌CSS的支持:https://developers.google.com/gmail/design/css嵌入式CSS在Gmail

不過,我複製他們的榜樣到一個文件css.html

<html> 
    <head> 
    <style> 
     .colored { 
     color: blue; 
     } 
     #body { 
     font-size: 14px; 
     } 
    </style> 
    </head> 
    <body> 
    <div id='body'> 
     <p>Hi Pierce,</p> 
     <p class='colored'>This text is blue.</p=> 
     <p>Jerry</p> 
    </div> 
    </body> 
</html> 

,並通過命令行派:

cat css.html | mail -s "$(echo -e "Test\nContent-Type: text/html")" [email protected] 

無論在Gmail網站還是Gmail應用程序中,它們都不能正常工作並顯示爲純文本。任何想法?

回答

3

不幸的是,它尚未推出。您引用的文檔是在「本月晚些時候」發佈後支持的文檔。 (ref - 谷歌的Gmail博客16年9月14日)

在本月晚些時候開始,Gmail和收件箱通過Gmail將支持與響應式設計創建 電子郵件,這意味着他們的內容適應各種規模的 適合屏幕。