0

我正在尝试创建一个电子邮件模板。对于底部和顶部标题,我希望使用圆角,但我现在设法做到这一点的唯一方法是使用 gif 文件......如果没有下面的代码,我怎么能做到这一点?(现在表格边框上下不完整,没有关闭)。我也尝试在中心添加一个 gif 图像

<td valign="top" align="center"><img src="file:///C|/Users/the/Desktop/my GIF.gif" width="288" height="146"></td> 

考虑到它是透明的,我想在图像的边缘或后面加上背景颜色——而且在底部也是如此。

对此模板的任何其他编辑都非常受欢迎。

<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<base target="_blank">
<title>==</title>
</head><body>

<table width="614" border="0" align="center" cellpadding="0" cellspacing="0" style="font-family:Arial, Helvetica, sans-serif; font-size:12px;  color:#656565;">
    <tbody><tr>
        <td valign="top" align="center"><img src="file:///C|/Users/the/Desktop/my GIF.gif" width="288" height="146"></td>
    </tr>
    <tr>
        <td valign="top" style="border-left:1px solid #cbd6dc;border-right:1px solid #cbd6dc; padding:0 18px 20px; text-align:left;">
              <table width="576" border="0" cellspacing="0" cellpadding="0" style="font-family:Arial, Helvetica, sans-serif; font-size:12px;">
                <tbody><tr>
                    <td valign="top" style="font-size:14px; padding:10px 0 15px;  font-weight:bold">Hello user,<br></td>
                </tr>
                <tr>
                   <td valign="top" style="font-size:19px; padding:10px 0 16px 0; text-align:center;color:#449AC2; ">Congragulations ! </td>
                </tr>
                <tr>
                   <td valign="top" style=" padding:0 0 15px;"> 
                        <table style="width:554px; border:#d3dde2 1px solid; background:#eef3f6;" border="0" align="center" cellpadding="0" cellspacing="0">
                                <tbody><tr>
                                    <td valign="top"><div style="font-size:12px; padding:16px  25px 0 0; line-height:20px;  text-align:left;padding-bottom:20px;"><a href="http://www.website.com/signup?sname=zmail23&amp;ISP=gmail&amp;invitation_key=201307f998225213537deb9e8a3c5930&amp;tt=773&amp;sub=755&amp;referral=bacorichard&amp;tp=8&amp;hr=2013072111&amp;cid=23&amp;source=5" style=" color:#666; text-decoration:none">.    
                                        <p>Congragulations my text here <br>
    <br>                                        
                                  </p></a></div><a href="http://www.website.com/signup?sname=zmail23&amp;ISP=gmail&amp;invitation_key=201307f998225213537deb9e8a3c5930&amp;tt=773&amp;sub=755&amp;referral=bacorichard&amp;tp=8&amp;hr=2013072111&amp;cid=23&amp;source=5" style=" color:#666; text-decoration:none"></a></td>
                                </tr>
                                <tr>
                                    <td valign="bottom" style="padding:0 0 50px 0"><a target="_blank" style=" border:2px solid #fff; padding:5px 6px; background:#f7b225; color:#ffffff; font-size: 16px; font-weight: bold; text-align: center;text-decoration:none; " href="http://www.website.com/signup?sname=zmail23&amp;ISP=gmail&amp;invitation_key=201307f998225213537deb9e8a3c5930&amp;tt=773&amp;sub=755&amp;referral=bacorichard&amp;tp=8&amp;hr=2013072111&amp;cid=23&amp;source=5"> Take me there</a></td>
                                </tr>
                            </tbody></table> 
                   </td>
                </tr>
                <tr>
                    <td valign="top" style="padding-bottom:18px;">
                        <div style="font-family:Arial, Helvetica, sans-serif; font-size:14px; text-align:left; padding:0 ; margin:0;color:#656565">Regards,</div>
                         <div style="font-family:Arial, Helvetica, sans-serif; font-size:14px; text-align:left; padding:0; margin:0;color:#656565">The Team</div>
                     </td>
                </tr>

             </tbody></table>
        </td>
    </tr>
    <tr>
        <td valign="top" style="font-size:11px; font-family:Arial, Helvetica, sans-serif; line-height:16px; padding:10px 0; background:#f6f7fa;border-left:1px solid #cbd6dc;border-right:1px solid #cbd6dc;border-top:1px solid #cbd6dc; padding:15px 18px 0 18px; text-align:center;">



           </td>
    </tr>
    <tr>
        <td valign="top"><img align="top" src="width=&quot;614&quot;" height="23"> </td>
    </tr>
</tbody></table> 
<img src="http://signup.website.com/signup/open_invitation/2013072111/773/755/23/8?isp=gmail&amp;source=5" style="display:none;visibility:hidden;" height="0" width="0/">


</body></html>
4

2 回答 2

1

您可以将border-radius 属性添加到您的表格样式中。

style="font-family:Arial, Helvetica, sans-serif; font-size:12px;border:1px solid #cbd6dc;border-radius: 5px;"
于 2013-08-10T01:25:46.277 回答
0

要使用圆角,您可以在大多数元素上使用这样的 CSS:

border-radius: 5px;

JSFiddle 示例:

http://jsfiddle.net/CbfvQ/

数字越大,角越圆。

如果你想要内联样式而不是 CSS 方法,那么像这样添加到样式中:

style="border-radius:5px;border:1px solid #cbd6dc;" 

请务必检查此功能的浏览器兼容性:

http://caniuse.com/border-radius现在得到广泛支持 :)

于 2013-08-10T01:26:56.713 回答