【问题标题】:Website images overlapping(Shopify) [closed]网站图像重叠(Shopify)[关闭]
【发布时间】:2017-06-02 14:11:44
【问题描述】:

我正在使用 shopify,并在其中添加了一个使用我自己的 html 的部分。我在主题中内置的“特色产品”部分中添加了口红、脸部和与其中一种产品重叠的脸部图片。我想知道我将如何解决这个问题?我需要进去用液体修理东西吗?

我已经通过使用 html 中的表格解决了这个问题;我为未来的读者提供了我的解决方案。

HTML

<div class="hover">
<center>
<table style="width: 182px; height: 159px;">
<tbody>
<tr style="height: 33px;">
<td style="width: 57.125px; height: 20px;">

  <figure><img  align=left valign=top width=350px type="image/jpeg" src="{{ 'lipstickpink.jpg' | asset_url}}" /></figure>
  <figure> <img align=left valign=bottom width=400px type="image/jpeg" src="{{ 'shadow.jpg' | asset_url}}" /> </figure>

  </td>
<td style="width: 900px; ">

  <figure><img align=center valign=top width=900px type="image/jpeg" src="{{ 'facehomepage.jpg' | asset_url}}" /></figure>

  </td>

  </center>

  </td>
</tr>
</tbody>
</table>

【问题讨论】:

    标签: html css image shopify liquid


    【解决方案1】:

    为照片添加填充。填充(例如 10 像素)将在所有边上添加 10 像素的空白空间(除非您指定 padding-top 或 padding-bottom 等。如果您愿意,您可以这样做。)您还可以为容器添加边距。负边距顶部将向上移动容器位置的外观,同样它也可以应用于照片。 (正面或负面)

    希望对你有帮助

    雷切尔

    【讨论】:

    • 默认主题中可能有边距和内边距,但如果你在css中的冒号后添加!important,这应该会覆盖默认设置
    • 请注意,当您尝试覆盖它并失败时,使用 !important 可能会造成混淆。
    • 是的,这不是给 OP 的(我会移动它)但是:css-tricks.com/when-using-important-is-the-right-choice
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-02-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-11-09
    • 2017-09-30
    相关资源
    最近更新 更多