简体   繁体   中英

Full height div to fixed

What I would like to do is this:

Create a full height div which go to a fixed top div after scrolling.

1) -----------
   |         |
   |         |
   |         |
   |---------|
   |        ?|
   -----------

After scroll:

2) -----------
   |        ?|
   -----------

If you scroll back, you get the full height again. Or, if you click the ?, you also get the full height.

I could picture it as an extra layer which can respond with the scroll but also toggle back when the question mark is clicked.

Can somebody help me out?

You can just toggle a div that is fixed to the top. set it to display none by default. Make a button that toggles that div

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM