Changing the background-image style in Reveal.js

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

Answers:

Answer

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);
 }

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.