Search code examples
htmlcssr-markdownioslides

ioslides background with css, title slide


When I have a slide mid-presentation that has a big title on it the background color is grey, but I want it to be white. What CSS code can I add to do this? I already figured out how to make all my text black, but how do I make that slide a white background?

For example:


---
title: "Untitled"
output: ioslides_presentation
---



## R Markdown

This is an R Markdown presentation.


# Make this slide white background (black text)

## Slide with Bullets

- Bullet 1
- Bullet 2
- Bullet 3

Solution

  • Slides, those have level1 header, but not the title-slide has the class dark specified. So overwriting the background property for the class dark changes that grey background.

    ---
    title: "Untitled"
    output: ioslides_presentation
    css: style.css
    ---
    
    ## R Markdown
    
    This is an R Markdown presentation.
    
    
    # Make this slide white background (black text)
    
    ## Slide with Bullets
    
    - Bullet 1
    - Bullet 2
    - Bullet 3
    

    style.css

    slides > slide.dark {
      background: white !important;
    }
    
    slide.dark h2 {
      color: black !important;
    }
    
    

    slide with bg