![](/img/trans.png)
[英]Parallax background scrolling: How can I fix my pattern to a specific location in my page?
[英]How can I make my navigation bar (which has transparent background) to float/overlap my background in a parallax-scrolling webpage?
我正在嘗試設計一個導航欄沒有背景且其漂浮在背景圖像上的網頁。 但是,這是一個視差滾動網站,當頁面滾動到第二部分時,我的導航欄將背景按其自身寬度的大小向下推。
我要求它浮動在我的部分上。
謝謝。
您的問題相當模糊。
您希望導航欄位於何處,尺寸如何?
如果您希望導航欄在整個部分中都保留在視口的頂部,請將其設置為position fixed; top 0; left: 0; z-index: 1000;
position fixed; top 0; left: 0; z-index: 1000;
(具有所需的高度和寬度),然后將視差圖層放置在輪播類型父DOM元素上
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.