previous

page 22

next
The Rainbow

Add this line and six others to index.html

<img src='images/rainbow/red.png' id='r' class='item rainbow'>

Add this to styles.css

.rainbow {
grid-row: 1 / span 5;
grid-column: 1 / span 8;
opacity: .4;
}

Note the opacity line.

Add this to set_scene.js

if (n==1) {
if (!g_red) Show('r');
if (!g_orange) Show('o');
if (!g_yellow) Show('y');
if (!g_green) Show('g');
if (!g_blue) Show('b');
if (!g_indigo) Show('i');
if (!g_violet) Show('v');
}

Note the exclamation mark (!) which is JavaScript for not.

previous
next