简体   繁体   English

加载器微调器不使用全视口高度 html css

[英]Loader spinner not using full view port height html css

我目前面临的这个输出如何获得完整的视口背景而不是我的加载器背景的这一半部分请帮助

 .sub-container { width: 100%; padding: 45px; height: 100vh; overflow: auto; position: relative; } .spinner { position: absolute; top: 0; left: 0; bottom: 0; right: 0; background: #d9d9d9; width: 100%; height: 100%; display: grid; place-items: center; opacity: 0.4; z-index: 1; }
 <div class="sub-container"> <div class="spinner"> <mat-progress-spinner mode="indeterminate" diameter="75" strokeWidth="5"> </mat-progress-spinner> </div> </div>

This is my source code for representing the material spinner in the background of my right container's div how can I achieve full viewport height for this.这是我的源代码,用于在我的右容器 div 的背景中表示材质微调器,我如何为此实现完整的视口高度。

Have you tried changing the .sub-container 's width (like so)?你有没有试过改变.sub-containerwidth (像这样)?

 .sub-container { width: auto; padding: 45px; height: 100vh; overflow: auto; position: relative; } .spinner { position: absolute; top: 0; left: 0; bottom: 0; right: 0; background: #d9d9d9; width: 100%; height: 100%; display: grid; place-items: center; opacity: 0.4; z-index: 1; }
 <div class="sub-container"> <div class="spinner"> <mat-progress-spinner mode="indeterminate" diameter="75" strokeWidth="5"> </mat-progress-spinner> </div> </div>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM