将<a>标签写在<td>标签外,无法使链接生效

本文探讨了在不同浏览器中&lt;a&gt;标签的使用情况,特别是在IE浏览器和其他浏览器(如火狐)之间的差异。文章指出,在IE中可以将&lt;a&gt;标签置于&lt;td&gt;标签之外使链接生效,但在火狐等浏览器中此方法可能无效。
在IE浏览器中可以使链接生效,但其他浏览器有的不支持将<a>标签写在<td>标签外(例如火狐浏览器)
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>请注意: 向俊杰更新了 安全生产主要负责人</title> <style> body { font-family: Arial, sans-serif; margin: 20px; } .header { font-size: 20px; font-weight: bold; color: #d9534f; } .content { margin-top: 20px; line-height: 1.6; } .content p { margin-bottom: 10px; } .note { margin-top: 20px; padding: 10px; border: 1px solid #f0ad4e; background-color: #fcf8e3; font-size: 14px; } .details { margin-top: 20px; border-collapse: collapse; width: 100%; } .details td, .details th { border: 1px solid #ddd; padding: 8px; text-align: left; } .details th { width: 30%; background-color: #f8f8f8; } .cta { margin-top: 20px; padding: 10px; background-color: #5bc0de; color: white; text-align: center; text-decoration: none; border-radius: 5px; } .cta:hover { background-color: #31b0d5; } </style> </head> <body> <div class="content"> <div class="note"> <p><strong>请注意:</strong> 向俊杰更新了 安全生产主要负责人</p> </div> <div> <span>报告链接</span> <a href="http://10.189.104.115:5173/#/licenseManage/index">http://10.189.104.115:5173/#/licenseManage/index</a> </div> <div> <span>文件链接</span> <a href="C:/new_ims/nginx-1.26.3/website/localImg/202511/1440745057832402944事项追踪状态与邮件.xlsx" target="_blank" download=20251119164629.xlsx>20251119164629.xlsx</a> </div> </div> <div class="content"> <p>此邮件由系统自动发送,请勿回复。</p> <p>如有疑问,请联系:<a href="mailto:mia.y.luo@rrd.com">mia.y.luo@rrd.com</a></p> </div> </body> </html>在上述代码中:“文件链接”中的元素要由url改成文件的绝对路径,该怎么改呢?
11-20
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Your Colleague Has Sent You an Appreciation! </title> <style> table, th, td { border: 0px solid; } table { width: 540px; height: 126px; background-repeat: no-repeat; color: black; } .eCarad { width: 100%; height: auto; } body { color: black; font-family: Verdana, Geneva, sans-serif; } table, th, td { border: 0px solid; } table { width: 540px; height: 126px; background-repeat: no-repeat; color: black; } .eCarad { width: 100%; height: auto; } body { color: black; font-family: Verdana, Geneva, sans-serif; } /* 新增媒体查询 */ @media screen and (min-width: 768px) { .eCard { max-width: 5% !important; margin: 0 !important; /* 移除自动居中 */ /* 新增左浮动 */ } } </style> </head> <body style=" font-family: Verdana, Geneva, sans-serif ;"> <p><b>Your colleague has sent you a Thank You Card! </b>We hope this card brings a smile to your day. We look forward to creating more amazing moments together!<br><br> <b>您的同事為您送上一張感謝卡 !</b> 希望這張卡能為您帶來美好的一天。期待與您一起創造更多美好時刻! </p><br> <p>如閣下未能觀看此訊息,請<a href="%photoLink%">按此</a>。<br> If you cannot view this message properly, please click <a href="%photoLink%">here</a>.<br><br> <img class="eCard" src="https://digimktgsolution.com/HKLStaffAppreciationWeek/upload/%fileName%" style="max-width: 100%; height: auto; display: block; margin: 0 auto;"></img><br> 瀏覽電子感謝咭<br> View Appreciation eCard </p> <a href="%link%">連結 Link</a> </body> </html> 使用以上代碼作爲template傳送email, @media screen and (min-width: 768px) { .eCard { max-width: 5% !important; margin: 0 !important; /* 移除自动居中 */ /* 新增左浮动 */ } }控制不了在outlook看的圖片大小,在outlook看圖片依然很巨大
最新发布
11-28
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值