防止 css 被覆盖
prevent css from getting overriden
我有 asp.net Web 表单项目,我在其中使用 telerik 控件。
My issue
在一个地方我需要从数据库加载 html 数据,它包含大量 css、图像和 html。
这是我的代码。
<telerik:RadLabel ID="ProdDetails" runat="server" Text='<%# (HttpUtility.HtmlDecode((string)Eval("HtmlBody"))) %>'></telerik:RadLabel>
它工作正常,但有时这个数据库 html css 会覆盖站点 css,因为该站点变得不稳定。
那么,是否有任何我的站点 css 无法被传入 html 覆盖的内容。
before down vote or close vote, please let me know if there is anything missing, wrong or required..
我知道,这个问题有点不对,但在一般情况下,任何人都会遇到这种问题。
所以,在浪费了一整天的时间寻找正确的处理方法后,我终于找到了一些不需要更新站点 css 或任何其他部分的东西。
这是一个 iframe。
是的,而不是在 div 中呈现 html 或在 iframe
中呈现任何其他元素
查看我为自己所做的工作。
<iframe frameborder="0" border="0" cellspacing="0" width="100%"
height="400px" runat="server" id="test"
srcdoc='<%# (HttpUtility.HtmlDecode((string)Eval("HtmlBody"))) %>'>
</iframe>
我有 asp.net Web 表单项目,我在其中使用 telerik 控件。
My issue
在一个地方我需要从数据库加载 html 数据,它包含大量 css、图像和 html。
这是我的代码。
<telerik:RadLabel ID="ProdDetails" runat="server" Text='<%# (HttpUtility.HtmlDecode((string)Eval("HtmlBody"))) %>'></telerik:RadLabel>
它工作正常,但有时这个数据库 html css 会覆盖站点 css,因为该站点变得不稳定。
那么,是否有任何我的站点 css 无法被传入 html 覆盖的内容。
before down vote or close vote, please let me know if there is anything missing, wrong or required..
我知道,这个问题有点不对,但在一般情况下,任何人都会遇到这种问题。
所以,在浪费了一整天的时间寻找正确的处理方法后,我终于找到了一些不需要更新站点 css 或任何其他部分的东西。
这是一个 iframe。
是的,而不是在 div 中呈现 html 或在 iframe
中呈现任何其他元素查看我为自己所做的工作。
<iframe frameborder="0" border="0" cellspacing="0" width="100%"
height="400px" runat="server" id="test"
srcdoc='<%# (HttpUtility.HtmlDecode((string)Eval("HtmlBody"))) %>'>
</iframe>