CSS Community Forum Question 8
body { /* Old browsers */ background : #141E30 ; /* Chrome 10-25, Safari 5.1-6 */ background : -webkit-linear-gradient(- 45deg , #35577D , #141E30 ); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */ background : linear-gradient(- 45deg , #35577D , #141E30 ); margin : 0 ; padding : 0 ; } Question Within the first body selector of this exercise, I see the following declarations: background: #141E30; background: -webkit-linear-gradient(-45deg, #35577D, #141E30); background: linear-gradient(-45deg, #35577D, #141E30); What is linear-gradient and why do we need three different background declarations? Answer linear-gradient() is a CSS function which creates a visual transition between two or more colors. This code snippet uses several fallback background properties for wider browser support. For example, older Chrome browsers might not be able to render the last background declaration but they might be able to render the...