I am not really a CSS Wizard, so i don't really have that many ideas on how to go about this. However the general notion is to change the background into an image, and several images during gameplay.
I've made a seperate folder called images for when i publish the game, so that i can have several images for the without going over the data limit.
I want to use a nice stylesheet theme like this one:
https://www.glorioustrainwrecks.com/node/5163 (the one called "simple box")
But have it so that the background is changed into an image, whilst still keeping the box and the text inside of it.
Then for each passage, the image changes.
Is there anyway to pull something like that off? I've tried to mere change the background into an image, but that removes the box...
Comments
The following example uses a desert tag to show a desert background image.
I used a passage based on Leon's to check my styling:
After modify Leon's "Simple Box" stylesheet to allow for the differences in SugarCube 2's HTML structure and default CSS I ended up with the following stylesheet.
Note the body.desert selector, it causes any passage tagged with desert to show the desert background image. To extend the above CSS all you need to do is make up a tag name for each of your different background images and the to add a related body.tag-name selector for each of the different tag names.
Thanks for the help!
Thanks for help!
You probably do not need, or really want, to use the <<addclass>> macro here. See above.