【问题标题】:Is there an alternative to "background-position" to have support in Gmail?在 Gmail 中是否有“背景位置”的替代方案来获得支持?
【发布时间】:2014-08-09 08:37:13
【问题描述】:

根据this CSS guide,Gmail 不支持background-positionleftright 和其他 CSS 属性。

我有一个带背景的 div,我想把这张图片放在那个 div 的右边。

这是我的 HTML -

 <div style="background-image: url('pic.jpg'); background-position:right; background-repeat: no-repeat;" dir="rtl">

由于 Gmail 不支持 background-position,我没有得到想要的输出。
有什么办法可以做到吗?

【问题讨论】:

  • 太模糊了。你实际上需要做什么?
  • 我在一个 div 中有一个背景图片,我想把它放在 div 的右边。默认在左边。
  • bg 图片在电子邮件中非常不可靠。如果您不需要文字,我们可以使用内联图像。如果这样做,请将文本放在图像中。 HTML 很烂,就是这样。

标签: css gmail background-image background-position


【解决方案1】:

使用速记法。它会让您在 Gmail 中使用背景位置

background: url(path/to/image.jpg) no-repeat left;

【讨论】:

    猜你喜欢
    • 2019-09-18
    • 2023-03-04
    • 1970-01-01
    • 2022-01-04
    • 2013-10-22
    • 2021-08-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多