0
我需要創建一個引導程序4佈局,圖像在頁面滾動並且圖像到達頁眉底部後粘貼到頂部,但在頁面向下滾動到頁腳和頁腳進入視口後,圖像應該開始滾動再次與頁面。 圖像應該只在大型和超大型自舉4格上纔有粘性。 我正在尋找的行爲應該與新的bootstrap 4類「sticky-top」被添加到圖像中一樣,只能使用css和jquery,因爲我不能使用sticky-top類,因爲缺乏瀏覽器支持。有沒有辦法做到這一點與jQuery?如何在滾動後將圖像粘貼到頂部,並在頁面滾動到頁腳後將其滾動到視圖外?
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<header>header sticks to top</header>
<div>breadcrumbs that scroll along with the page go here</div>
<div class="row">
\t <div class="col-12 col-lg-6">
<img src="image.jpg" class="img-fluid" alt="image">
</div>
<div class="col-12 col-lg-6">
\t <p>Bunch of random text goes here</p>
</div>
\t </div>
<footer>Footer stuff goes here</footer>
你可以通過在codepen或jsfiddle或任何第三方服務上進行演示來展示你所嘗試的嗎,我們很容易理解這個問題。 – Niraj
我想創建類似於apple.com上的內容在此頁面上,例如:http://www.apple.com/shop/buy-mac/macbook-pro?product=MLH42LL/A&step=config# –