【发布时间】:2017-02-07 22:18:16
【问题描述】:
我目前有一个从字符串文件中提取文本的 asp 标签。我想在此标签旁边添加一个红色 *。我该怎么做呢?
<asp:Label ID="Label29" runat="server" Text="<%$ Resources:strings, sample_generalinformation %>"/>
【问题讨论】:
我目前有一个从字符串文件中提取文本的 asp 标签。我想在此标签旁边添加一个红色 *。我该怎么做呢?
<asp:Label ID="Label29" runat="server" Text="<%$ Resources:strings, sample_generalinformation %>"/>
【问题讨论】:
您可以执行以下操作。只需在您的标签标签右侧添加一个span 标签,其样式属性的值为color: red
像这样:
<asp:Label ID="Label29" runat="server" Text="<%$ Resources:strings, sample_generalinformation %>"/><span style="color:red;">*</span>
【讨论】:
如果您想要 * 以及相同的文本,则应该可以:
<asp:Label ID="Label29" runat="server" Text="<%$ Resources:strings, sample_generalinformation %> <span style='color: red;'>*</span>"/>
如果你想要在 seperaret 中,还有另一种选择:
<asp:Label ID="Label29" runat="server" Text="<%$ Resources:strings, sample_generalinformation %>"/><span style="color:red;">*</span>
【讨论】: