View source: R/position-sticky.R
position_sticky | R Documentation |
Use position_sticky()
to position an element at the top or bottom of the
viewport after scrolling past the element.
position_sticky(x, ...)
x |
A tag element or .style pronoun. |
... |
A character string specifying an edge. One of,
|
An object of the same type as x
.
Other position utilities:
position_centered()
,
position()
library(htmltools)
div(
.style %>%
position_sticky(sm = "top"),
"Sticks to the top of the viewport on small screens"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.