1
1
mirror of https://github.com/primer/css.git synced 2024-12-01 12:42:32 +03:00

Add note about adding a direction

This commit is contained in:
simurai 2019-11-21 20:30:31 +09:00
parent 43c2fedd13
commit ab63d71d6c

View File

@ -303,6 +303,7 @@ _Note: fixed positioning has been disabled here for demonstration only._
Use `.position-sticky` to keep an element stuck to an edge as long as its parent is visible. Things to keep in mind: Use `.position-sticky` to keep an element stuck to an edge as long as its parent is visible. Things to keep in mind:
- Using the `.position-sticky` class by itself doesn't have any effect. An additional `[top|bottom|left|right]-0` class is needed. See the examples below.
- Add a background color to sticky elements so it covers the content underneath. - Add a background color to sticky elements so it covers the content underneath.
- Use `style="z-index: 1;"` (or higher) in case there are other elements with `z-index`. - Use `style="z-index: 1;"` (or higher) in case there are other elements with `z-index`.