它应该支持html email,所以我不能使用justify-contentalign-items.

我试着用position: absolute代表<img />,但对html邮箱不起作用?

我是不是要把推特图标放在左边,和1-2-3放在同一条线上?

enter image description here

    <div
      class="footer-container"
      style="
      position: relative;
      background: pink;
      position: fixed;
      bottom: 0;
      width: 100%;"
    >
      <!-- position is not working on html email -->
      <div
        class="image-container"
        style="position: absolute; top: 30px; left: 24px"
      >
        <img 
          src="https://www.citypng.com/public/uploads/preview/-516139511470ymv2hndq6.png"
          alt="test"
          width="94"
        />
      </div>
      <div
        class="centered"
        style="padding-top: 40px; padding-bottom: 40px; padding-right: 30px; text-align:right;"
      >
        <a>1</a>
        <a>2</a>
        <a>3</a>
    </div>
</div>

推荐答案

在邮箱模板中,您只有有限支持,因此,您可以使用过时的或在语义上不正确的技术来处理普通的HTML文件.

在这种情况下,您应该使用表格进行布局.您可以使用:style="width: 0; white-space: nowrap;"将表格单元格缩小到其最小内容

<table width="100%">
  <tr>
    <td>
      <img src="https://www.citypng.com/public/uploads/preview/-516139511470ymv2hndq6.png" alt="test" width="94">
    </td>
    <td style="width: 0; white-space: nowrap;">
      <a>1</a>
    </td>
    <td style="width: 0; white-space: nowrap;">
      <a>2</a>
    </td>
    <td style="width: 0; white-space: nowrap;">
      <a>3</a>
    </td>
  </tr>
</table>

Html相关问答推荐

html中背景色的全单元格R中的Rmarkdown表

如何将值从Google Sheets侧边栏中的表单中的输入传递到Google Sheets单元格中使用Textile()

如何仅 Select 与子代CSS类匹配的第一个元素

如何最大限度地减少Cookie同意代码对性能的影响?

将表格背景图像置于行背景 colored颜色 之上

未在抖动中播放的HTML音频||文本正在工作其他标记正在播放,但音频未播放

如果DIV没有特定的sibling 姐妹,则以CSS为目标

有没有什么方法可以很容易地给一个SVG一个插框阴影?

高度:适合-内容不拉伸以适合内部长度

如何在VB.NET中用打印预览和直接打印的方式在Html中打印数据表的内容,包括页眉/设置纸张/方向/适合页面/总计

多次使用组件时计数Angular 14中嵌套数组的指令

如何在没有包装元素的情况下在React(Next.js)中呈现HTML注释

顶部有文字的图像的悬停效果

在 WooCommerce 存档产品类别描述上添加阅读更多/阅读更少按钮

网格项未在同一行上对齐

Sass 混合动画未正确应用

需要帮助个性化我的 CSS 导航栏:如何在鼠标悬停时突出显示
  • 元素?
  • HTML、CSS设计图像出格

    为什么 text-align 应用于 span 而不是 CSS 中的 img

    是否可以将文本添加到表格边框?