[英]Page Doesn't show content on FIREFOX, but does in Chrome, and even IE
奇怪的是,我的頁面之一的某些方面未在FireFox上顯示。 我已將問題縮小為:
主頁(適用於所有瀏覽器) <div id="wrapper">
具有以下CSS:
margin: 0px auto;
width: 1000px;
background-color: #272727;
min-height: 100%; /* ie6 ignores min-height completely */
height: 100%;
background-size:100%;
這樣可以確保具有良好的灰色背景。 另外,我正在使用石工jquery腳本來浮動我的所有東西。 在所有花車結束時,我使用以下命令清除它們:
<div style="clear: both;"></div>
這使一切都完美。 但是在另一頁上,這似乎沒有用,所以我將這一行代碼添加到了包裝樣式中(針對該頁面)
style="overflow: auto;"
現在,在IE和Chrome上,一切都很好,可以還原背景,但是在Firefox上,內容或背景都看不到。 刪除代碼時,內容存在,但背景不存在。
為什么是這樣? 最讓我驚訝的是IE正常工作,而Firefox卻沒有工作?!
編輯:
添加clear:both
或clear:left
並overflow:auto;
在包裝的 CSS。
#wrapper {
background-color: #272727;
background-size: 100% auto;
height: 100%;
margin: 0 auto;
min-height: 100%;
width: 1000px;
clear: both; /* Added Clear Property */
overflow:auto; /* Added Overflow Property */
}
由於tagbar <div>
包裝上面<div>
是浮動的左邊,所以你需要清除浮動。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.