gpt4 book ai didi

HTML/CSS 内联背景图片

转载 作者:行者123 更新时间:2023-11-28 08:38:20 26 4
gpt4 key购买 nike

我正在尝试创建一个页面,将用作时事通讯,所以我的代码是 html/css 内联。

http://jsfiddle.net/Chamberja/6t9r14ew/

我想在整个表格后面添加一个背景图片,这样 Logo 和文本就会出现在前景中。

我试过添加

style="background-image: url("bg.jpg")"

style= "background: url(bg.jpg)"

所以最后的代码看起来像

<table style="background: url(sportip.biz/alpha.jpg)" border="0" cellpadding="0" cellspacing="0" align="left" class="deviceWidth">
<tr>
<td style="padding:10px 20px" class="center">
<a href="#"><img src="http://sportip.biz/nlsiplogo.jpg" alt="" border="0" /></a>
</td>
</tr>
</table>

我认为我做错了内联。

最佳答案

希望这就是您要找的:

<table style="background: url(sportip.biz/alpha.jpg)" border="0" cellpadding="0" cellspacing="0" align="left" class="deviceWidth">

<tr>
<td style="padding: 10px 20px" class="center">
<a href="#"><img src="http://sportip.biz/nlsiplogo.jpg" alt="" border="0" /></a>
</td>
</tr>

</table>
<!-- End Logo -->

<!-- Nav -->
<table style="position: absolute; margin-top: 0; margin-left: 0;" border="0" cellpadding="0" cellspacing="0" align="right" class="deviceWidth">

<tr>
<td class="center" style="font-size: 13px; color: #272727; font-weight: light; text-align: right; font-family: Georgia, Times, serif; line-height: 20px; vertical-align: middle; padding:10px 20px; font-style:italic">
<b>Dear #name#,
Check out the latest releases of our magazines</b>
</td>
</tr>

</table>

这是 fiddle .

关于HTML/CSS 内联背景图片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27920432/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com