代码之家  ›  专栏  ›  技术社区  ›  iamjawa

为什么第二个部分不在MJML中显示?

  •  0
  • iamjawa  · 技术社区  · 9 年前
    <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>
    

    <mj-section>

    1 回复  |  直到 9 年前
        1
  •  2
  •   Nicolas Garnier    9 年前

    你错过了 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>