简体   繁体   中英

"sticky" Angular Material toolbar

I'm building an Angular web app with a menu that has lots of categories. I would like something similar to a toolbar that will be "sticky" at the top once the user scrolls past the app.component.html standard navigation items.

Here is how it looks before you scroll.

After the user scrolls down I would like the purple toolbar to become "sticky" and stick to the top. How do I do this?

Angular Material does some sneaky things with hiding overflow. Use the answer here to answer question

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