我有这本字典的价值,就像这样:
@Umbraco.GetDictionaryValue("BookingStep1_ClosedPickup")
我有句话是这样说的:
位置关闭时间为16,在dict值中,我已经指定了小时数,如so时数,因此它显示了用户"16“。
问题是,如何才能将这部分的dict值作为样式呢?我希望它是红色的,大胆的或者其他什么的。我似乎找不到任何方法来瞄准它。
发布于 2016-02-04 17:21:24
您可以包装调用,以获得HTML元素中的字典项,并将其作为CSS的目标,以应用样式:
剃须刀剧本:
<p>The location Closing hour is 16 and in the dict value i have defigned hours like so <strong class="red">@Umbraco.GetDictionaryValue("BookingStep1_ClosedPickup")</strong> so it shows the user "16".</p>CSS:
strong {
font-weight: bold;
}
strong.red {
font-color: #ff0000;
}若要针对字典项文本的部分,可以在字典项定义中包含HTML元素。在这种情况下,字典项应该如下所示:
The location Closing hour is <strong class="red">[hours]</strong>https://stackoverflow.com/questions/35200706
复制相似问题