mc:可重复的背景颜色mailchimp

问题描述 投票:0回答:1

我的html MailChimp模板中有可重复的部分,但无法解决如何让客户端选择在白色或绿色之间更改背景颜色。

到目前为止,我已经尝试过了

/*
@tab background-test
@section background-Colour
*/

    .background-test {
        /*@editable*/background-color:#000000 !important;
    }

而这在体内

<table width="650" border="1" cellspacing="0" cellpadding="0" align="center" class="wrapper" style="margin-left:auto; margin-right:auto; table-layout:fixed;" mc:repeatable mc:variant="test color">
  <tr>
    <td align="center" valign="top" class="background-test">
      <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" mc:edit="change-background">
        <tr>
          <td width="30" class="hide"> </td>
          <td align="center" valign="top" class="pad_side">
            <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
              <tr>
                <td height="30" class="fix_height"> </td>
              </tr>
              <tr>
                <td class="white" align="center" valign="top" style="font-family:Arial, sans-serif;font-size:24px;line-height:27px;color:#ffffff;" mc:edit="section2_maintitle">Neque porro quisquam est qui dolorem ipsum</td>
              </tr>
              <tr>
                <td height="7" style="line-height:1px;font-size:1px;"> </td>
              </tr>
              <tr>
                <td class="white" align="center" valign="top" style="font-family:Arial, sans-serif;font-size:14px;letter-spacing:1px;line-height:17px;color:#ffffff;" mc:edit="section2_semititle">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</td>
              </tr>
              <tr>
                <td height="30" class="fix_height"> </td>
              </tr>
            </table>
          </td>
          <td width="30" class="hide"> </td>
        </tr>
      </table>
    </td>
  </tr>

</table>

但我希望能够改变每个部分的背景颜色,而不是所有重复的背景颜色相同。

此外 - 是否有一种方法可以使它们只能选择2种颜色 - 在这种情况下,白色或绿色(#82c9c2)?

谢谢

html-email mailchimp
1个回答
0
投票

你能加一个额外的课吗?像这样:

/*
@tab background-test
@section background-Colour
*/

    .background-green {
        /*@editable*/background-color:green !important;
    }
    .background-white {
        /*@editable*/background-color:white !important;
    }

并在身体:

<table width="650" border="1" cellspacing="0" cellpadding="0" align="center" class="wrapper" style="margin-left:auto; margin-right:auto; table-layout:fixed;" mc:repeatable mc:variant="test color">
  <tr>
    <td align="center" valign="top" class="background-green">
      <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" mc:edit="change-background">
        <tr>
          <td width="30" class="hide background-white"> </td>
          <td align="center" valign="top" class="pad_side">
            <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
              <tr>
                <td height="30" class="fix_height"> </td>
              </tr>
              <tr>
                <td class="white" align="center" valign="top" style="font-family:Arial, sans-serif;font-size:24px;line-height:27px;color:#ffffff;" mc:edit="section2_maintitle">Neque porro quisquam est qui dolorem ipsum</td>
              </tr>
              <tr>
                <td height="7" style="line-height:1px;font-size:1px;"> </td>
              </tr>
              <tr>
                <td class="white" align="center" valign="top" style="font-family:Arial, sans-serif;font-size:14px;letter-spacing:1px;line-height:17px;color:#ffffff;" mc:edit="section2_semititle">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</td>
              </tr>
              <tr>
                <td height="30" class="fix_height"> </td>
              </tr>
            </table>
          </td>
          <td width="30" class="hide"> </td>
        </tr>
      </table>
    </td>
  </tr>

</table>
© www.soinside.com 2019 - 2024. All rights reserved.