当前位置: 首页 > 知识库问答 >
问题:

如何使表格单元格响应iOS邮件应用程序

柳胜
2023-03-14

我目前正在开发一个电子邮件,在不同的地方有2列布局。我最初使用

要修复Outlook问题,我只需更改

还有人在iOS邮件应用程序中遇到过这个问题吗?我不明白为什么我的内联样式和媒体查询被忽略了,仅仅因为元素现在是表格单元格而不是div。

超文本标记语言(抱歉,尽力清理):

<table cellspacing="0" cellpadding="0" width="100%" align="center">
  <tbody>
    <tr style="vertical-align: top;">
      <td width="100%">
        <table class="container" style="max-width: 650px; margin: 0 auto;background:#fff;" cellspacing="0" cellpadding="0" width="100%" align="center">
          <tr>
            <td class="col-6-article" style="display:inline-block; width:300px !important; padding: 0 0 25px 15px;">
              <img class="center fullwidth" style="display: block; width: 100%!important; max-width: 325px;" src="http://billykroger.com/img/1mLusPPr.jpg" width="325" />
              <h3>Pledges to Ipsum fall short</h3>
              <p>Abby Bruell | Jun 2015</p>
              <p>Despite good intentions, donors to the London conference have failed to follow through will the pledges they made to aid Syrian refugees. Now, millions of women and children face the consequences of their inaction.</p>
              <table>
                <tr>
                  <td style="text-align: center; height: 33px; width: 160px; background: #007c76;">
                    <table style="margin: 0 auto;">
                      <tr height="5" style="height:5px"></tr>
                      <tr style="line-height:normal">
                        <td><a style="padding: 0; color: #ffffff" href="#">
                          <span style="color: #FFFFFF; font-size: 14px">READ MORE</span>
                          </a>
                        </td>
                        <td>
                          <a style="padding: 0; color: #ffffff;" href="#">
                          <img width="20" height="20" style="height: 20px !important; width: 20px !important;" src="http://cww.convio.net/images/content/pagebuilder/arrow.png" />
                          </a>
                        </td>
                      </tr>
                      <tr height="5" style="height:5px"></tr>
                    </table>
                  </td>
                </tr>
              </table>
            </td>
            <td class="col-6-article" style="display:inline-block; width:300px !important; padding: 0 0 25px 15px;">
              <img class="center fullwidth" style="display: block; width: 100%!important; max-width: 325px;" src="http://billykroger.com/img/1mLusPPr.jpg" width="325" />
              <h3>Pledges to Ipsum fall short</h3>
              <p>Abby Bruell | Jun 2015</p>
              <p>Despite good intentions, donors to the London conference have failed to follow through will the pledges they made to aid Syrian refugees. Now, millions of women and children face the consequences of their inaction.</p>
              <table>
                <tr>
                  <td style="text-align: center; height: 33px; width: 160px; background: #007c76;">
                    <table style="margin: 0 auto;">
                      <tr height="5" style="height:5px"></tr>
                      <tr style="line-height:normal">
                        <td><a style="padding: 0; color: #ffffff" href="#">
                          <span style="color: #FFFFFF; font-size: 14px">READ MORE</span>
                          </a>
                        </td>
                        <td>
                          <a style="padding: 0; color: #ffffff;" href="#">
                          <img width="20" height="20" style="height: 20px !important; width: 20px !important;" src="http://cww.convio.net/images/content/pagebuilder/arrow.png" />
                          </a>
                        </td>
                      </tr>
                      <tr height="5" style="height:5px"></tr>
                    </table>
                  </td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
      </td>
    </tr>
</table>

CSS媒体查询:

@media screen and (max-width: 650px) and (max-device-width: 650px) {
     .col-6-article {
         width: 100% !important;
         display: block !important;
     }
}

共有1个答案

夏元明
2023-03-14
匿名用户

你有决斗<代码>!重要的标签;您不需要包含!内联css中的重要。改变这个:

<td class="col-6-article" style="display:inline-block; width:300px !important; padding: 0 0 25px 15px;">

对此:

<td class="col-6-article" style="display:inline-block; width:300px; padding: 0 0 25px 15px;">

一旦<代码>!重要信息从主体的内联css中删除后,媒体查询代码可以覆盖300px的宽度,并将其更改为100%或任何您想要的宽度。

 类似资料:
  • 我需要设计像下面这样的带有nslayoutconstraints的自定义单元格,通过编程使用可视化格式语言以及带有项目的约束。任何帮助都将不胜感激。 `/*初始化并分配产品名称*/Product Name =[[ui label alloc]init];product name . font =[ui font font with name:@ " HelveticaNeue " size:17.

  • 我正试图让一个Google表单根据1个表单输入的数据,用多行填充电子表格,如下所示: 表单简单,客户信息最少https://docs.google.com/forms/d/1LrKlVuI7kxVU0lxz70Uu-2Obj4x3qIwe6nS-ErzbCAg/ 输入后,我需要表格在表格(或格式化表格)中输入数据,如下所示:-输入的每个部分(1、2或3)应位于单独的行中,具有相同的客户名称 然后,

  • 但这无济于事。有什么想法吗?

  • 问题内容: 如何确保表格的每个单元格都应变成 正方形 而不使用固定大小?当他们改变宽度时要有所 反应 。 问题答案: 您可以使用以下技术中描述的技术:响应正方形的网格。 适应您的带有表和 方形表单元格的 用例,它看起来像这样:

  • 当处理一个 RESTful API 请求时,一个应用程序通常需要如下步骤 来处理响应格式: 确定可能影响响应格式的各种因素,例如媒介类型,语言,版本,等等。 这个过程也被称为 content negotiation。 资源对象转换为数组,如在 Resources 部分中所描述的。 通过 yii\rest\Serializer 来完成。 通过内容协商步骤将数组转换成字符串。 response for

  • 在poi中创建一个表非常简单,但它的教程非常有限,我找不到一个可以在生成docx文件时在表中创建简单合并单元格的教程。