Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialIoana Sauluc
3,251 PointsI have hard time to add coins in the bonus game.
Hi everyone.
- I have hard time to add coins in the bonus game.
- I would like to make the background with gradient, but I don't know how to do it. Can someone guide me please. Here is my snapshot trying to add the coins in the game. https://w.trhou.se/xmgvqrd3vk Thank you
3 Answers
Steven Parker
231,275 PointsIn "game.js" you should be able to add more lines after line 22 for each additional coin. Be sure to give them different locations.
There are several issues regarding the gradient:
- the CSS file should be loaded with a "link" element with "href" attribute, not a "script" with "src"
- the "background.css" file has some HTML in it, but it should be pure CSS
- the CSS is incomplete and needs to be inside a rule block with a selector
- the gradient value should be part of an "background-image" property setting
- the hex color code should not be in quotes
Ioana Sauluc
3,251 PointsI can't see if I overlapping the coins. I just to guide myself after the other values of the poison, stars and platforms, but I can't see it when I preview it. My screen is just the colour of the background. If I take out the line 146 the call of my function, I can see again the game. So I think I've done something wrong but I don't know what. I checked all the game 2 times, but I don't realise what is wrong. Thank you for reply
Steven Parker
231,275 PointsOn lines 64 and 65, you have "animation" (singluar) instead of "animations" (plural).
Ioana Sauluc
3,251 PointsThank you very much...very much....hahahaha... and it worked