angularjs - 为 AngularJS 网站制作全屏加载图像
问题描述
我想在我的 AngularJS 网站完全引导之前显示全屏图像。
一种方法是使用ng-cloak
.
这是显示一行单词的示例。
我尝试制作全屏图像
[ng-cloak].splash {
/* The image used */
background-image: url("https://media.thetab.com/blogs.dir/13/files/2017/02/nice-guy-2.jpg");
/* Full height */
height: 100%;
/* Center and scale the image nicely */
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
http://plnkr.co/edit/OTYwqGehVAsw5R8V?preview
但它没有用。有谁知道为什么?
解决方案
你错过display: block !important;
了 [ng-cloak].splash
[ng-cloak].splash {
/* The image used */
background-image: url("https://media.thetab.com/blogs.dir/13/files/2017/02/nice-guy-2.jpg");
/* Full height */
height: 100%;
/* Center and scale the image nicely */
background-position: center;
background-repeat: no-repeat;
background-size: cover;
display: block !important;
}
推荐阅读
- angular - 更改 Angular Mat 输入边框底部颜色
- scala - Scala反射:获取特定类型的所有构造函数参数
- java - 找不到命令“cmd”,但有 16 个类似的
- typescript - Typescript:如果属性值来自嵌套对象,为什么我的代码无法编译?
- javascript - 合并javascript数组中的重复对象及其出现频率
- go - AWS S3 API 会话到期时间
- jupyter-notebook - Colab 无法识别现有目录
- python - 从数据框 groupby() 制作一个正确的字典
- powershell - 为什么我不能匹配来自 wsl.exe 输出的字符串?
- mysql - SELECT FROM 与子查询上的多个外部联接