gpt4 book ai didi

javascript - 覆盖 :host css in ionic framework

转载 作者:行者123 更新时间:2023-12-04 07:21:25 27 4
gpt4 key购买 nike

我如何覆盖:主机 css

:host {
--width: 304px;
--min-width: auto;
--max-width: auto;
--height: 100%;
--min-height: auto;
--max-height: auto;
--background: var(--ion-background-color, #fff); // <-- i want to shut this down
inset: 0px;
display: none;
position: absolute;
contain: strict;
}
PS。这个css是关于 ion-content 的
我会很感激任何帮助。

最佳答案

您不必更改 :host CSS改变ion-content的背景.您可以将其添加到您的 CSS

ion-content{
--ion-background-color:#111D12; // Or whatever color you want
}
但是如果你真的想改变 :host CSS,然后您可以将其添加到全局 CSS 文件中。
:host {
--background: none; // or whatever color you want
}

关于javascript - 覆盖 :host css in ionic framework,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68476373/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com