我有一个徽标的png图像,我将其转换为base64代码,该图像与我所做的邮件和打印预览部分的背景一起正确呈现,但在下载部分,该图像是docx文件的一部分,图像的背景变为黑色
我已经创建了如下的动态HTML
<table width="650px" align="center" cellpadding="0" cellspacing="0" style="color: #434955;border-top: 10px solid #c70b5e; font-family: 'Open Sans', 'arial',' sans-serif';">
<tr>
<td>
<table width="100%" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="70%" >
<img style="display: block;" alt="" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJcAAAAXCAYAAAAGL92hAAAABmJLR0QA/wD/AP+gvaeTAAAIKElEQVRo3u2af2wTVRzAb24dIioi4A9EQRhru7Gtd9eBE8WZIFvvXQfETI2BICqKCkQER8tQJqiIUYMoKqJ/IETwRzDBKEgAUfEHOhFCiJoF5cfWYVQIUwYU2Px+27v23ev96tY1zPSSb7bee+/er899f73juMyVuc6nK8TVDgo5gmtCOcGWUHZwP/w/NbMqmatT1xFuTi8AahFIK0g7LU3ZwarMCnXvK1/0u9LeaTvHZYWy500EiBpZqFRpdgTXZban+155om+oSyBN6TWBjlovwLPDCKoYXDnBLZkt6qZgFfsGukTyG8DVnpYOD3KBPuBLvQPgtFmB1Vm4ysvLcwoLq3Ot6jlHVV3S0T4GllX3zMvz9ejsuoii6OjqsQ4Rx/TuNDAwVzvzHT6y6kqXIP+CYCULF6zDxUmvacQM5gR32oHKLlxOgUx0C+R9FCcvr8R7LkG6B2QPTOosyDmQBqcgPY6wxdp5pHFw/wuQE8oC/AOy1lUi5VtuME+qoO566PuYungunhyBt/RdNy+NNh6rPCU2VoEsj45Vngrt98bGKpJf3YI0i6uuzlbbuXjpdmjzFTXW4/B7dX4pGWI2zuLisb3cglwD9etBTitt8e83TpE8hEAnNIJ+1TGi5PM+HwIN9Z+Ddgdj8wWN5BblRXkjfZcmwFFWcbmy/u2q0M+Etss0wMIz4P6jyhxPUu1CIGucvOS1hKs5N1iQDFj24JKW0Bus+Z0g0gaOq7vAxcsv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CoAdTSNaBmE24Qo55szQAQYoikqrggv3h92blfitorQXWG5kWuDZamQnmOXup+m+kFy5Kc0XrrLAlil+VbrjQpDMAtcJzP0fzDtBNi6RCkoIrJ1Cr0VBwFKQp52b3Q+1mx5ymAy7G9J5Ax91wPBj10eYGoqx0woVmWJNS6cBJQRfBleACFBWRPnRKBtb8PTYpixo1KbgauWBfgGobyEkAbWm7Tsd2r3TAhc4umyRFp1pPxTM+TxjP19ILl1SpDV7kaRZfLPTDgCfVcIGfei/9HEyj6ESKo+k6haL/F/uuVDbKKvLbq+WXpgiuiOTz+UuuzxZhf+ESq4VLSCwEbZ4uPmYwtzCRrz1JAwYeAkL+KHPvAJ8yYs4J7Kw9zs3qmDC6YvAJFPUx2s27CMPrBWn28nlymnwAlq9U6dIY+0eHF4xP5W+YIJIxQQfK1mjPwIQGIOfFxyB/r1RkmEDc9VqODaXzD1TrgxNcafbqibPDuhFAftDAmijHpy36mBOX7YyKSySZwbY6NwQDCyLFRwtGadu5wqnI/wHmIhgjPgDE/qSgGZT2k7yMNjnJze6vfbB3JnVv0f/" />
<br/><br/><br/><div style="font-size: 18px;">This is the data for __Name__ below:</div>
</td>
</tr>
</table>
</table>
可以做些什么,以便得到一个适当的白色背景的图像,而不是黑色背景,显示为PNG图像?
您可以在table元素上使用下面的内联样式…
风格="background - color: # fff"
如果你想保持透明度,你需要将图像插入docx文件。