index-menu沒有高度,footer會(huì)移上來
這個(gè)問題不知道怎么解決, 希望各位幫個(gè)忙。
先上圖, 效果是這樣:
我用chrome的開發(fā)者工具看了一下index-menu的盒子模型信息:
發(fā)現(xiàn)高度為0。
相關(guān)的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; }
如果需要完整的文件, 我會(huì)貼出來
2017-08-12
因?yàn)閜osition:absolute(絕對(duì)定位)會(huì)將塊從文檔流中摳出來,再放在應(yīng)有的位置,所以不占原來文檔流的位置,所有下面的部分會(huì)上移。應(yīng)該改成相對(duì)定位
2017-03-25
footer加個(gè)bottom:0;就可以撐開了。
2016-09-05
menu-list也是,導(dǎo)致learn more那里定位出錯(cuò)
2016-07-16
我也是這樣的情況,到這里不知道哪里出問題了,menu撐不開
2016-06-22
是不是.index-menu那個(gè)div沒寫清除浮動(dòng)?