Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个在用户页面上生成 html 内容的 javascript 代码。问题是用户使用的样式会影响我的 html 代码。我想完全重置我的容器类/id下的所有css,我该怎么做?
例如,正常的 css 重置样式不会重置表格边框、背景颜色等。
您可以使用 iframe 使您的代码不受当前用户页面上的 css 影响。
<iframe src="YourURL" ></iframe>