去掉高就沒效果
.scrollspy-example{
??? height:500px;
??? font-size:20px;
??? overflow:auto;
??? position: relative;
}
去掉里面的height:500px;之后就沒有效果了,為什么?
教程里面說加上高知識(shí)為了產(chǎn)生垂直滾動(dòng)條,但是我內(nèi)容夠長(zhǎng)的話為什么還要加上高才有效果呢?
.scrollspy-example{
??? height:500px;
??? font-size:20px;
??? overflow:auto;
??? position: relative;
}
去掉里面的height:500px;之后就沒有效果了,為什么?
教程里面說加上高知識(shí)為了產(chǎn)生垂直滾動(dòng)條,但是我內(nèi)容夠長(zhǎng)的話為什么還要加上高才有效果呢?
2016-11-22
舉報(bào)
2018-08-29
因?yàn)榇怪睗L動(dòng)條就要是設(shè)置元素定高,overflow:auto;
2016-11-23
height:auto;
2016-11-23
height:auto;