0 votes
asked by (2.4k points)
closed by
Darn, what is with me and colors....

 

Anyway, exactly like my other questions but with the background, I don't want all passages to change, just 1.

What I truly want however, is to have a black background with a color gradient.

Something like this...

https://www.xmple.com/wallpaper/black-green-gradient-linear--c2-000000-00ff00-a-225-f-14-image/

But if thats not possible due to media limitations I'll be happy with a solid color change.
closed with the note: Got my answer.

1 Answer

+1 vote
answered by (530 points)
selected by
 
Best answer

Edit story stylesheet > add the following:
 

tw-story[tags~="insertTAGhere"] {
background-color: insertCOLORhere;
}



To apply this background to any given passage, add the tag from your code above.

Refer to this page for css gradients: https://www.w3schools.com/css/css3_gradients.asp

commented by (2.4k points)
edited by

Holy crap! Thank you random person!
 

Y'all are the most helpful people. This will definitely add spice to my game.

 

For future reference, this is what ending up working.

tw-story[tags~="Purple"] {
background-image: linear-gradient(to bottom right, black, purple);
}

 

Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.
...