加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – bootstrap twitter CSS在gmail中失败

发布时间:2020-12-17 02:31:27 所属栏目:百科 来源:网络整理
导读:我使用Bootstrap Twitter将 HTML格式化为摘要电子邮件. 格式化在Mail(Mac电子邮件客户端)中看起来不错,但是当我从浏览器检查我的Gmail时,格式化不适用,所以它看起来不太好. 知道为什么会这样吗? 我的邮箱布局: !DOCTYPE htmlhtml head meta content='text/
我使用Bootstrap Twitter将 HTML格式化为摘要电子邮件.

格式化在Mail(Mac电子邮件客户端)中看起来不错,但是当我从浏览器检查我的Gmail时,格式化不适用,所以它看起来不太好.

知道为什么会这样吗?

我的邮箱布局:

<!DOCTYPE html>
<html>
  <head>
    <meta content='text/html; charset=UTF-8' http-equiv='Content-Type' />
      <link href='http://twitter.github.com/bootstrap/assets/css/bootstrap.css' rel='stylesheet' />
  </head>
  <body id='email'>
      <div class="container">
            <%= yield %>
      </div>
  </body>
</html>

digest.html.erb

<div class="row">
       <div class="span4">...</div>
     </div>
       ...

在Gmail中查看时,digest.html.erb中的bootstrap twitter CSS格式不适用或显示.格式化在我的Mail(mac)电子邮件客户端中确实很好看.

gmail中来自电子邮件的来源:

----==_mimepart_4f71da44a148b_612e3fe48e034ec4200f0
Date: Tue,27 Mar 2012 17:18:28 +0200
Mime-Version: 1.0
Content-Type: text/html;
 charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Content-ID: <4f71da44b71dc_612e3fe48e034ec4202ee@joel-maranhaos-macbook-pro.local.mail>

<!DOCTYPE html>
<html>
  <head>
    <meta content=3D'text/html; charset=3DUTF-8' http-equiv=3D'Content-Ty=pe' />
  <link href=3D'http://twitter.github.com/bootstrap/assets/css/bootstrap=.css' rel=3D'stylesheet' />
 </head>
  <body id=3D'email'>
                =


    <div class=3D"container">
      <br/>
    ....

我注意到文本中所有这些3D前缀和一些随机=,但我不相信这是问题所在.
有任何想法吗?

解决方法

阅读 this article,解释了< head>经常被电子邮件客户端忽略.通常,您希望在body标签中包含所有样式,最好将它们应用于每个元素

<p style="font-family:pupcat;text-size:15px;line-height:19px;">Blah</p>

你也应该解决这些错别字,他们不会帮你

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读