Forum Discussion
STORYLINE LIGHTBOX BACKGROUND (MODERN PLAYER) NOT TRANSPARENT
I have a lightbox where I needed to make the background transparent, hide the lightbox wrapper, and also adjust overlay color/transparency around it (that I used for a fading effect).
I put these in a JavaScript trigger on the lightbox slide master layout. You don't need all of these, you can play around each of them and see the result. Using this was easier than editing the output html every time. It's important that these are on slides used for lightbox only because it assumes you have these elements on the page. I also added a trigger on the masterpage for Escape. When the user presses Escape on a lightbox, it closes. Much friendlier than mousing or tabbing to the X.
document.getElementsByClassName('lightBoxSlide')[0].style.backgroundColor = "transparent"
document.getElementsByClassName('visible-overlay')[0].style.backgroundColor = "rgba(255, 255, 255, 1)"
document.getElementById('light-box-wrapper').style.background="none"
Hi Zsolt
Thank you very much for the solution. It works but I seem to have a black border on the lightbox that I cannot get rid off. Do you perhaps know of a code that can help with the problem.
Related Content
- 9 months ago
- 4 months ago
- 9 months ago