因此,在纵向和横向中,屏幕右侧 30% 左右只是白色,仅在 iPhone 和其他小屏幕上,好像宽度小于 100%。这是我的 HTML:
<div id="loading">
<div id="loading-message">
<p>Please enable Javascript to view this site.</p>
<p class="tar">-Thanks</p>
</div>
<div id="loadingBar">
<div id="loadingBarInner"></div>
</div>
</div>
和相关的CSS:
#loading {
background: gray;
width: 100%;
position: absolute;
height: 1800px;
box-shadow: inset 0px 0px 500px black;
}
#loading-message {
margin: auto;
border-radius: 30px;
padding: 100px;
box-shadow: 0px 0px 50px 10px black;
width: 300px;
margin-top: 200px;
font-size: 30px;
font-weight: bold;
}
#loadingBar {
margin: auto;
width: 350px;
height: 30px;
margin-top: 300px;
border-radius: 5px;
border: 2px solid black;
padding: 2px;
}
#loadingBarInner {
background: #6d0019; /* Old browsers */
height: 30px;
width: 0px;
border-radius: 5px;
}