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 trialMona Jalal
4,302 Pointslinear gradient not working
.jumbotron{
color: #660198;
background: linear-gradient(bottom left, rgba(25,21,52 , .975), rgba(25,21,52 , .925), rgba(128, 0, 128, .25)) ;
}
the text color changes but background no, why?
3 Answers
Benjamin Larson
34,055 PointsI believe the standard syntax rules for CSS3 gradients require your direction parameter (in this case, "bottom left"), to be prefixed with "to". Depending on the browser you are viewing this in, there may be a slight variation on the syntax rules that you'll have to lookup.
.jumbotron {
color: #660198;
background: linear-gradient(to bottom left, rgba(25,21,52 , .975), rgba(25,21,52 , .925), rgba(128, 0, 128, .25)) ;
}
Tom Checkley
25,165 Pointshttps://css-tricks.com/css3-gradients/
background: linear-gradient(to bottom left, rgba(25,21,52 , .975), rgba(25,21,52 , .925), rgba(128, 0, 128, .25));
to bottom left is the new spec, sorry about previous answer, hadn't used gradients for a while
Tom Checkley
25,165 Pointsi think it needs to be background-color