html - 在 div 中加载新 html 时避免 CSS 覆盖

标签 html css kendo-grid

简介

我正在为用户电子邮件收件箱功能开发剑道网格。电子邮件在网格中完美加载,没问题,我心里感到非常满足。我可以查看每封电子邮件的详细信息。

问题 当第三方内容丰富的电子邮件以详细信息 div 加载并覆盖网站的 CSS 时,详细 View 开始出现问题。更容易想象主网站的样子。

Research:I have made research to avoid this override behavior but it seems there is no other solution than specificity. I cannot change css allover to avoid override.

编辑

Another option was to load newly loaded html(email) in iframe if one can resole iframe issues.

如果有人遇到过此类问题,请提供帮助。任何形式的帮助或引用都将不胜感激。

感谢您的宝贵时间。

最佳答案

如果您使用任何第三方内容,如 html 或电子邮件,您应该使用 iframe 以避免可能扭曲 ui 和 Cross-site scripting (XSS) 的 css 冲突。这可能会破坏您的页面或窃取您的数据。

关于html - 在 div 中加载新 html 时避免 CSS 覆盖,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53067189/

相关文章:

javascript - Uncaught ReferenceError : CustomerContract is not defined in Kendo Grid when creating new record

javascript - 如何将用户输入的表单值从 html 传递到 javascript?

javascript - 如何将单选按钮显示为在 Rails 中改变颜色的 Bootstrap 按钮?

jquery - 使用 Jquery 随机设置图像的宽度

javascript - 在 Kendo Grid 中定义列类型?

templates - Kendo 网格列号格式

javascript - Swiper spaceBetween 无法正常工作

html - 非样式化 HTML 元素是否会在文档流中产生任何类型的问题或任何跨浏览器问题?

html - 嵌套居中和垂直对齐

javascript - 旋转并保持 Font Awesome 图标的位置