将背景图像放置在之外嵌入 html 邮件中的边框

发布于 2024-09-29 19:50:33 字数 262 浏览 3 评论 0原文

浏览一些 html 电子邮件示例,我注意到都是关于表格的。我想要主表的某一行内的图像看起来像一半图像在表外,另一半在表内。我无法找到解决方案来做到这一点。

任何帮助将不胜感激,非常感谢 这就是我喜欢的。

替代文字 橙色细线将是表格边框 我让它在网页中工作,我可以在其中使用 div 和大量样式表,但在嵌入电子邮件的 html 中还没有找到方法。正如你所看到的,图像上方有文字和图像

Looking through some html email examples, I noticed is all about tables. I wanted an image inside of one of the rows of the main table to look like half of the image is outside the table and the other half inside. I can't get the solution to do that.

Any helps would be appreciated, really appreciated
Here's is what I like.

alt text
The orange thin line would be the table border
I got it working int the webpage where I can use divs and a lot of stylesheet but in html embedded in email haven't found the way. As you can see there's text and images above the image

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

病女 2024-10-06 19:50:33

在这里,我设法创建一个简单的示例:

 +--------+--------+--------+
 | TEXT GOES HERE  |        |
 |                 | empty  |
 |                 |        |
 |        +--------+--------+
 |        |                 |
 |        | IMAGE GOES HERE |
 |        |                 |
 +--------+-----------------+

您基本上要做的是:

  • 创建一个包含三列的表格(实际上只有 2 个
  • 对于文本:使用 文本
  • 对于图像:使用 此处可能有文本 >

jsFiddle 上的实时示例(已更新,现在包括边框)

Here, I managed to create a simple example:

 +--------+--------+--------+
 | TEXT GOES HERE  |        |
 |                 | empty  |
 |                 |        |
 |        +--------+--------+
 |        |                 |
 |        | IMAGE GOES HERE |
 |        |                 |
 +--------+-----------------+

What you're basically doing is:

  • Create a table with three columns (actually there are only 2 <td>s)
  • For text: Use <td colspan="2">text</td> <td></td>
  • For an image: Use <td>maybe text here</td> <td colspan="2"> <img/> </td>

Live example on jsFiddle (updated, it includes borders now)

失与倦" 2024-10-06 19:50:33

恐怕这是无法做到的:背景图像将仅跨越它所在的元素,不再进一步。

您也许可以使用一个巨大的、不可见的单元格来执行某些操作,使您的表格扩展到可见数据之外。

I'm afraid this can't be done: A background image will span only as far as the element it is in, no further.

You may be able to do something with a huge, invisible cell that makes your table extend beyond the visible data.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文