index-menu沒有高度,footer會移上來
這個問題不知道怎么解決, 希望各位幫個忙。
先上圖, 效果是這樣:

我用chrome的開發者工具看了一下index-menu的盒子模型信息:

發現高度為0。
相關的css代碼如下:
.index-menu?{
position:?relative;
border-top:?4px?solid?#f34949;
}
.index-menu?.index-menu-tips?{
position:?absolute;
left:?50%;
width:?154px;
height:?70px;
margin-left:?-77px;
background:?#F34949;
text-align:?center;
line-height:?60px;
color:?#fff;
font-size:?20px;
}
.index-menu?.index-menu-tips:after?{
position:?absolute;
content:?"";
width:?0;
height:?0;
bottom:?0;
left:?0;
border-left:?77px?solid?transparent;
border-right:?77px?solid?transparent;
border-bottom:?10px?solid?#fff;
}如果需要完整的文件, 我會貼出來
2017-08-12
因為position:absolute(絕對定位)會將塊從文檔流中摳出來,再放在應有的位置,所以不占原來文檔流的位置,所有下面的部分會上移。應該改成相對定位
2017-03-25
footer加個bottom:0;就可以撐開了。
2016-09-05
menu-list也是,導致learn more那里定位出錯
2016-07-16
我也是這樣的情況,到這里不知道哪里出問題了,menu撐不開
2016-06-22
是不是.index-menu那個div沒寫清除浮動?