Changing the background-image style in Reveal.js
Asked Answered
A

1

3

I am trying to access the styles of the background-image in reveal.js for three reasons:

a) I'd like to override the background image in the overviewmode b) I'd like to blur some backgrounds with CSS

I found two articles on SO that helped me:

a) How to position a background image in reveal.js? b) reveal.js background color choices

But I must be missing something, so I created this jsFiddle to demonstrate the problem: http://jsfiddle.net/dirkk0/asya4grv/

 html.thisState .state-background {
     /* background image is NOT changed, but the backgroundcolor changes */
     background-color: rgba(0, 0, 0, 0.8);
     background-image: url('http://pngimg.com/upload/small/key_PNG1180.png');
 }

You can see that there are suddenly two background images. What am I doing wrong?

Thanks, Dirk

Andryc answered 25/11, 2014 at 18:33 Comment(0)
J
6

You have to overwrite the ".backgrounds" class instead ".state-background". Background images are not placed in ".slides". That's why your CSS code wont blur the background images.

.backgrounds {
     -webkit-filter: blur(5px);
     -moz-filter: blur(50px);
     -o-filter: blur(5px);
     -ms-filter: blur(5px);
     filter: blur(5px);
 }
Jud answered 1/12, 2014 at 15:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.