View source: R/add_tbody_css.R
add_css_tbody | R Documentation |
add_css_tbody
will add css to the tbody tag i.e. to all table apart from the headers and
second headers.
add_css_tbody(tableHTML, css)
tableHTML |
A tableHTML object created by the tableHTML function. |
css |
A list of two elements with the corresponding css. The first element of the list should be an atomic vector with the style definitions (e.g. background-color). The second element will be an atomic vector with the same length as the first element, which will contain the style definitions' values (e.g. red). Check the examples for more information. |
add_css_thead
will add css to the tbody tag i.e. to all table apart from the headers and
second headers.
A tableHTML object.
tableHTML(mtcars) %>%
add_css_tbody(css = list('background-color', 'lightgray'))
tableHTML(mtcars) %>%
add_css_tbody(css = list('background-color', 'lightgray')) %>%
add_css_tbody(css = list('background-color', 'lightblue'))
tableHTML(mtcars) %>%
add_css_tbody(css = list('background-color', 'lightgray')) %>%
add_css_tbody(css = list('text-align', 'center'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.