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!
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 trial
how can i make the background image visible while using the gradient color property in css
could you please remind me of the exact value to use in the background-image gradient property that will make the background image blend with the colors i specify
Justin Warren7,805 Points
This video looks to have an answer for you questions!
In the video, Guil used this code to create a cool background with a gradient:
background: linear-gradient(#ffa949, transparent 90%), #ffa949 url('../img/mountains.jpg') no-repeat center;
Also it is important to remember that the first value listed will be the top layer. The last one will be at the bottom.
So for this example:
background: linear-gradient(#ffa949, transparent 90%), TOP LAYER #ffa949 url('../img/mountains.jpg') no-repeat center; BOTTOM LAYER
Hope this helps!!
dragos busuioc24,908 Points
put in the colors from gradient an alpha transparency : rgba(0,0,0,0.6)