html - HTML 电子邮件的图像左对齐问题
问题描述
编码和学习如何创建 HTML 电子邮件的新手。我随机选择了一封电子邮件并尝试复制它。
我正在尝试将 Google 图片与 Apple Play 商店图片对齐,并将社交媒体图标全部放在左侧。
我搜索过 W3、Google 和 Stack Overflow。我试图添加填充。
谢谢您的帮助。
<tr>
<td>
<img src="/img/applestorelogo.png" width="auto" height="24" style=" display: inline-block;" alt="applestorelogo"/>
</td>
<td>
<img src="/img/googlestore.png" width="auto" height="24" alt="googlestore"/>
</td>
<td><img src="/img/fb.png" width="auto" height="24" alt="facebook"/>
</td>
<td><img src="/img/IG.png" width="auto" height="24" alt="instagram"/>
</td>
<td><img src="/img/twitter.png" width="auto" height="24" alt="twitter"/>
</td>
</tr>
下面是图片
解决方案
在我看来,您应该只使用三个<td>
.
以下是您的方案的一个想法。您可能需要根据您的布局更改宽度:
<table border="1" style="width:50%">
<tr>
<td style="text-align: center; width: 5%;">
<img src="/img/applestorelogo.png" width="auto" height="24" alt="applestorelogo"/>
</td>
<td style="text-align: center;width: 5%;">
<img src="/img/googlestore.png" width="auto" height="24" alt="googlestore"/>
</td>
<td style="text-align: right;">
<img src="/img/fb.png" width="auto" height="24" alt="facebook"/>
<img src="/img/IG.png" width="auto" height="24" alt="instagram"/>
<img src="/img/twitter.png" width="auto" height="24" alt="twitter"/>
</td>
</tr>
</table>
推荐阅读
- html - 仅使用 CSS 使视频在特定区域可见
- c - 是否有打开内存映射文件的便携式(Windows、Linux、MacOS、Android)方式?
- ios - iOS应用程序中的TabBar导航事件不起作用
- pandas - 为什么火花中的一些音符工作得非常慢?为什么在同一情况下多次执行有不同的执行时间?
- vba - 更改创建平面的颜色
- c - 关于 C 中特定结构定义的说明
- java - 在 Sublime Text 3 中构建文件以调用 JUnit5 测试
- ios - 包装 AVPlayer 行为时处理 AVPlayerLayer
- c++ - C++ 继承和相同的功能名称
- google-sheets - 谷歌表格数组拆分函数公式