2016-11-29 100 views
2

可以滾動表現得像一個固定的元素。我想滾動覆蓋內容的元素,而不是移動其全部寬度。當盒子有overflow: hidden:hover更改爲overflowauto時,會出現問題。懸停滾動和文字跳躍

as it is, and how I wants it to be

JSBin爲了更好地理解這個問題 https://jsbin.com/gurijinugo/edit?html,css,output

的我使用jQuery

+0

但javascript會好嗎? – Roberrrt

+0

是的,在JavaScript中的獨奏會很好:) –

+2

https://jsbin.com/nawolefupu/1/edit?html,css,output ....那麼保存滾動條的空間就像這樣 – DaniP

回答

0

我解決了這個問題不感興趣的解決方案。我不使用@DaniP添加的評論解決方案,因爲我的問題更復雜。如果有人遇到類似問題,我添加了一個解決方案。我添加了一個包裝div,其中有position: absolute;和固定width。 爲了更好的理解JSBin: https://jsbin.com/mogavegule/edit?html,css,output