Learn R Programming

yonder (version 0.1.0)

affix: Affix elements to top or bottom of page

Description

The affix utility function applies Bootstrap classes to fix elements to the top or bottom of a page. Use "sticky" to cause an element to fix to the top of a page after the element is scrolled past. Important, the IE11 and Edge browsers do not support the sticky behavior.

Usage

affix(tag, position)

Arguments

tag

A tag element.

position

One of "top", "bottom", or "sticky" specifying the fixed behavior of an element.

See Also

Other design: active, background, border, display, float, font, height, padding, scroll, shadow, width

Examples

Run this code
# NOT RUN {
### See top of page

div(
  span("I'm up here!") %>%
    padding(left = 3, right = 3) %>%
    background("teal")
) %>%
  display("flex") %>%
  flex(justify = "center") %>%
  affix("top")

# }

Run the code above in your browser using DataLab