颜色的CSS内联样式未应用于Laravel 4.2中的电子邮件模板中的文本


CSS inline style for colour not applied to text in email template in Laravel 4.2

我正在设置Laravel 4.2来发送电子邮件。我已经为邮件准备好了电子邮件模板。为电子邮件输入的数据存储在一个数组中。但是,如果我传递一个参数,例如$variable,则样式仅应用于部分文本。

app/view/email.blade.php

//let's say $variable = 'This'
<td align="center" 
class="heading1" 
style="display:block!important; 
max-width:654px!important; 
margin:0 auto!important; 
clear:both!important; 
font-family:&#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; 
color:#212121; 
font-size: 28px;">
<strong> {{ $variable }} <br> is some text. </strong></td>

如上所示,输出应该是"This is some text"。但是,颜色仅适用于<br>而不是整个文本。有什么问题吗?

示例输出:

This <-- colour #212121 is applied
is some text <-- text turned purple (should be #212121).

我知道这可能真的很基本,你可能已经尝试过了,但你在<strong>标签上有冲突的风格吗?那么,颜色#2212121被覆盖了吗?

例如,你有没有试着把重要的标签放在颜色内联上?只是想看看它是否会有所不同。我知道这并不能解释为什么第一段文字的颜色是正确的,这只是一个想法。

:)

<strong>标记中应用css,如:

<strong style="color:#212121;"> This <br> is some text. </strong>