我有這樣的啓動畫面。啓動屏幕與CSS高度100%不工作
HTML
<div id="spalsh">
<span> <img src="{% static 'dbexplorer/img/loading.gif' %}" style="height: 100px;" > </span>
</div>
CSS
#spalsh{
width: 98%;
height: 100%;
background: rgba(252, 252, 252, 0.67);
z-index: 10000;
position: absolute;
margin: 0px;
padding: 0px;
}
#spalsh span{
position: absolute;
width: 100%;
text-align: center;
top: 60px;
}
如果頁面高度增加動態再閃屏不能覆蓋全高。我想覆蓋頁面的整個高度。有沒有JS的PURE CSS的解決方案?
添加圖像:
爲什麼不嘗試添加身高:100%的範圍呢? – 2014-09-22 08:01:17
您應該將圖像高度設爲100%。 參見此處[http://stackoverflow.com/questions/18164227/using-css-to-make-image-size-100-to-height-of-container][1] [1 ]:http://stackoverflow.com/questions/18164227/using-css-to-make-image-size-100-to-height-of-container – Developer 2014-09-22 08:02:43
試過,沒有成功.. :) – 2014-09-22 08:02:54