You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何使用Liquid使表格中Windows列与Mac列垂直顶部对齐?

解决表格列垂直顶部对齐问题

给两个<td>标签的样式中添加vertical-align: top即可让两列内容都对齐到顶部,同时补全原始代码中缺失的<tr>起始标签(保证代码规范),修改后的代码如下:

<table data-mce-fragment="1" width="100%">
  <tr>
    <td data-mce-fragment="1" style="width: 50%; vertical-align: top;">{{ 'https://cdn.shopify.com/s/files/1/0556/5258/1539/files/windows-logo.png'| img_tag: 'Windows Compatible Operating Systems' }} Windows Compatible Operating Systems<br><br>
    {{ product.metafields.custom.windows_compatible_operating_systems_3_0 }}</td>
    <td data-mce-fragment="1" style="width: 50%; vertical-align: top;">{{ 'https://cdn.shopify.com/s/files/1/0556/5258/1539/files/mac-logo.png?v=1707807667'| img_tag: 'Mac Compatible Operating Systems' }} Mac Compatible Operating Systems<br><br>
    {{ product.metafields.custom.mac_compatible_operating_systems_3_0 }}</td>
  </tr>
</table>

内容的提问来源于stack exchange,提问作者user23395528

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.30 02:35:10