0
<mjml>
  <mj-body>
    <mj-section>
      <mj-column>
        <mj-text align="center">
          This is a header
        </mj-text>
      </mj-column>
    </mj-section>

    <mj-section>
      <mj-column>
        <mj-text align="center">
          Another Header
        </mj-text>
      </mj-column>
    </mj-section>

  </mj-body>
</mjml>

由于某些原因,在上述 MJML 电子邮件代码中,第二个<mj-section>在浏览器中查看时根本不显示。当图像放置在部分而不是文本元素中时,这也不会显示。我今天才刚刚发现该框架,因此非常感谢有关其原因和解决方法的任何信息或说明。

4

1 回答 1

2

你错过了mj-container标签。这是有效的代码:

<mjml>
  <mj-body>
    <mj-container>
      <mj-section>
        <mj-column>
          <mj-text align="center">
            This is a header
          </mj-text>
        </mj-column>
      </mj-section>

      <mj-section>
        <mj-column>
          <mj-text align="center">
            Another Header
          </mj-text>
        </mj-column>
      </mj-section>
    </mj-container>
  </mj-body>
</mjml>
于 2017-06-30T08:35:36.460 回答