【问题标题】:custom Angular component not applying css class on ie11自定义 Angular 组件未在 ie11 上应用 css 类
【发布时间】:2021-01-15 13:05:28
【问题描述】:

我有一个组件,例如:

<my-component></my-component>

我想给这个组件一个

overflow-x: hidden;

我试过了:

<my-component class="ofx-hidden"></my-component>
.ofx-hidden {overflow-x: hidden;}

但是类只是没有出现在调试器中。它确实出现在其他浏览器中

我试过了:

<my-component style="overflow-x: hidden;"></my-component>

也没有工作,只是没有出现在 dom 中

我试过了:

<my-component></my-component>

和

:host {overflow-x: hidden;}

在 my-component.scss 文件中

似乎没有任何效果,我能做什么或我做错了什么?

【问题讨论】:

    标签: css angular internet-explorer sass


    【解决方案1】:

    就我而言,它没有正确刷新缓存。刷新缓存后,上述任何一项都有效。 FML。

    【讨论】:

    • 感谢您发布此问题的解决方案。您可以将您的答案标记为已接受的答案。它可以在未来帮助其他社区成员解决类似的问题。感谢您的理解。
    猜你喜欢
    • 2019-12-23
    • 1970-01-01
    • 1970-01-01
    • 2018-06-16
    • 1970-01-01
    • 1970-01-01
    • 2020-02-16
    • 2020-11-05
    • 1970-01-01
    相关资源
    最近更新 更多