Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Changing background as the story goes on

Hi guys! New to twine.

I found a way on how to use a custom page background on Twine (via CSS). But how can I keep changing that background as the story changes/goes on?

My idea was to update the background when the character travels from one place to another in the story, using an image that reflects the actual "place" (like a desert, a forest and so on), so that the player can enjoy a bit more immersion in the game.

Is there an easy way to do this? Change the CSS dynamically? Sorry I'm a beginner.

Thanks!! :D

Comments

  • You can accomplish this using Tag CSS, which is where you create multiple versions of that stylesheet that use different backgrounds, assign a tag to them, and then use that tag on all applicable passages.

    So, the desert background is used by a stylesheet tagged "desert", and all the desert passages are also tagged "desert", etc.
  • Thanks a lot!

    I will definitely check those CSS tags out.

    Thanks again!  ;D
Sign In or Register to comment.