Skip to contents

The height_relative() function adjusts a tag element's height relative to the height of its parent element.

Usage

height_relative(x, percent)

Arguments

x

A tag element or .style pronoun.

percent

A number specifying a percent. One of,

  • 25

  • 50

  • 75

  • 100

Value

An object of the same type as x.

Examples


library(htmltools)

div(
  .style %>%
    height_relative(50)
)
#> <div class="h-50"></div>

div(
  .style %>%
    height_relative(75)
)
#> <div class="h-75"></div>