【问题标题】:Asp.net: make div content partially boldAsp.net:使 div 内容部分加粗
【发布时间】:2015-01-15 21:57:47
【问题描述】:

我有一个 div,其 innerHtml 在我的 c# 代码 (.cs) 中设置。

<div id="feedbackRow" runat="server"></div>

.cs

feedbackRow.InnerHtml = "Activate your account to access reward points and unlock deals, discounts and bigger savings!.</br>You will find an ACTIVATE link within the body of the email.If you did not recevied the email into your inbox then please check your spam folders. </br>Thanks again for using ABC";

在这里,我想在上面的语句中加粗“激活”字或说一些文本应该是不同的颜色/字体。我该怎么做?

【问题讨论】:

    标签: c# html asp.net


    【解决方案1】:

    您可以将要加粗的文本放在&lt;b&gt;&lt;strong&gt; 标记之间。

    <b>text</b>
    

    <strong>text</strong>
    

    【讨论】:

      【解决方案2】:

      也许是简单的html:

      feedbackRow.InnerHtml = "<strong>Activate</strong> ..."
      

      【讨论】:

        猜你喜欢
        • 2023-01-31
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2014-01-16
        • 1970-01-01
        • 2013-06-05
        • 2020-04-23
        • 2017-01-23
        相关资源
        最近更新 更多