如何在创建反应应用程序中删除导入的 CSS



在我的content.tsx文件中,我有:

import style from 'style.css';

加载页面时,CSS文件被导入并附加到head中,这很好,但是有没有办法从同一content.tsx中的DOM中删除这种样式?

console.log(style)仅显示一个空对象。

如果您不想包含 CSS 只需从组件中删除import style from 'style.css';

最新更新