【发布时间】:2020-01-07 10:38:09
【问题描述】:
我正在使用最新版本的 Ionic v5.0.0,并且我正在尝试在我的组件中添加一个自定义 gif 加载器。我尝试添加背景图片 url 并分配固定的高度和宽度。但是由于某些奇怪的原因,没有 css 属性生效。
这是我的 ts 代码:
const loader = await this.loadingCtrl.create({
spinner: null,
cssClass: 'global-loader',
duration:10000
});
这是我的 home-results 组件 css:
.global-loader {
background: url("/assets/img/loader.gif") no-repeat;
background-size: 100% 100%;
--height: 64px;
--max-height: 64px;
--max-width:64px;
--min-height:64px;
--min-width:64px;
--width:64px;
}
任何帮助将不胜感激 阿马尔
【问题讨论】:
-
不,它不起作用我使用的代码是种类或类似但css没有生效
标签: ionic-framework ionic-native