首页 > 解决方案 > 在不更改格式的情况下在单词周围添加边框?HTML

问题描述

我正在尝试在注意力周围添加边框。但是,每当我使用它时,整个文本的格式都会发生变化,并且脱离上下文。这是原文

<p style="margin: 0in; margin-bottom: .0001pt; text-align: center; line-height: 14.0pt; background: white;" align="center"><span style="font-size: 10.0pt; font-family: 'MarkOT-HeavyItalic',sans-serif; mso-bidi-font-family: Calibri; color: red; mso-bidi-font-style: italic;">ATTENTION: This email came from an external source. This email came from an external source This email came from an external source.&nbsp;This email came from an external source <a href="mailto:aaaa">example@example.com</a></span></p>
<p style="margin: 0in; margin-bottom: .0001pt; text-align: center; line-height: 14.0pt; background: white;" align="center"><span style="font-size: 14.0pt; font-family: 'MarkOT-HeavyItalic',sans-serif; mso-bidi-font-family: Calibri; color: red; mso-bidi-font-style: italic;"><span style="mso-spacerun: yes;">&nbsp;</span></span></p>

我希望 ATTENTION 在不更改其余文本格式的情况下看起来像这样,有什么办法吗?

<table border="2" style="height: 10px; width: 13.3803%; border-collapse: collapse; border-style: solid; border-color: black; background-color: yellow;" height="10">
<tbody>
<tr>
<td style="width: 100%;">ATTENTION:</td>
</tr>
</tbody>
</table>

嘿伙计们,所以@abhijat_saxena 是正确的,但在 Windows 上的 Outlook 应用程序中,这就是它的外观,有什么方法可以填充空白,使其完全变黄? Outlook 应用程序图像

标签: htmloutlookoutlook-web-app

解决方案


<p style="margin: 0in; margin-bottom: .0001pt; text-align: center; line-height: 14.0pt; background: white;" align="center"><span style="font-size: 10.0pt; font-family: 'MarkOT-HeavyItalic',sans-serif; mso-bidi-font-family: Calibri; color: red; mso-bidi-font-style: italic;"><span style="border:1px solid #000; padding:2px">ATTENTION:</span> This email came from an external source. This email came from an external source This email came from an external source.&nbsp;This email came from an external source <a href="mailto:a">example@example.com</a></span></p>
<p style="margin: 0in; margin-bottom: .0001pt; text-align: center; line-height: 14.0pt; background: white;" align="center"><span style="font-size: 14.0pt; font-family: 'MarkOT-HeavyItalic',sans-serif; mso-bidi-font-family: Calibri; color: red; mso-bidi-font-style: italic;"><span style="mso-spacerun: yes;">&nbsp;</span></span></p>


推荐阅读