简体   繁体   中英

IN R MARKDOWN, How Can I add a background image (HTML output)?

图像应代替黑色背景

I'm trying to put an image as background for my R markdown document (HTML output) Instead of the black background. I Was searching everywhere in the documentation on how to do this but I can't seem to find any answer as it's my first time working with R Markdown.

I can't seem to know how to put the background image and how to divide it that way so I can have my content in the middle

I'm also trying to attach a Hyperlink to tablist option,in the Picture 2 as you can see "Source" as for when I click on it, it directs me to an external page but ## [Source] ("github.com/example") isn't working which was the syntax in the documentation.

在此处输入图片说明

this is my code till now .. I hope you can help me with these two questions, it's again : - How to set a background image to an HTML output on the whole page like the black background and how can I make the click on " Source " or TabItem directs me to an external link?

Thank you

    ---
title: "Title"
author: "Nessy"
date: "2 3 2020"
output:
  rmarkdown::html_document:
    theme: lumen
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# {.tabset .tabset-fade}

## Analysis

## Source

Just posting the answers here so it can be marked as "answered." (Kindly mark this as answer when you're done and if this satisfies you).

1) Regarding background theme check this out: https://rpubs.com/thaufas/555157

2) Try [github](someurl) with no space in between. EDIT: Regarding opening the link in markdown there try these links R Markdown - Hyperlink outside Rmd file or Linking to url with rmarkdown using Knit Word in Rstudio .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM