Forum Discussion
olaola
3 months agoCommunity Member
Same background under multiple blocks in Rise
Hey community! I have a question. Is it possible to add a separate background under multiple blocks in Rise? I'd like to add a single graphic that would cover a paragraph, a bullet list, and a tabs b...
PhilFoss
3 months agoCommunity Member
Of course its possible! I did a screen recording showing how you can create a theme component and let two or more blocks 'share' a common background. In this example I have a text block above a numbered list, and they share the dark gradient svg image.
The key to this is using background-attachment:fixed in the CSS. Here's the CSS I ended up with:
div[style*="--color-background: #1d1d1d"] {
background-image: url(darkbg-1e.svg);
background-attachment: fixed;
}
- ralli2 months agoCommunity Member
This is fantastic! I tried it, but I have one question. When I have used it in a microlearning module, the image is first rendered on the screen as separate images per block, and when I scroll, it 'jumps' into place. Do you know what would cause that, or do you have a fix for it?