【问题标题】:Why my splash screen don't go full screen?为什么我的启动画面不能全屏显示?
【发布时间】:2018-12-25 14:58:00
【问题描述】:

我有一个带有初始屏幕的 Angular 6 应用程序,我希望初始屏幕全高,但我不知道出了什么问题。这是今天的图片:

https://imgur.com/TqX30Ef

    body,
    html {
      height: 100%;
    }

    .m-splash-screen {
      background-color: #3c1977;
      position: absolute;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      height: 100%;
      width: 100%;
      z-index: 99999;
    }
  </style>

这是我的 CSS 我必须做什么?

【问题讨论】:

  • 固定而不是绝对
  • 实际上,这取决于.m-splash-screen 元素的父级是什么/谁。你也可以申请top:0; left:0;到.m-splash-screen。

标签: html css angular splash-screen


【解决方案1】:

使用固定位置,absolute 最初会占用 100% 的高度,但是当你滚动时它不会覆盖整个屏幕。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-09-09
    • 1970-01-01
    • 2017-06-01
    • 1970-01-01
    • 2021-09-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多