rox94
Registered Member
- Nov 6, 2024
- 70
- 34
Hi everyone,
I am considering using a CSS gradient for the background of my website, and I wanted to get some feedback on whether it's a good practice. Here's the CSS code I'm using for the background:
background: rgb(166,36,78);background: -moz-linear-gradient(90deg, rgba(166,36,78,1) 0%, rgba(0,0,0,1) 5%, rgba(0,0,0,1) 95%, rgba(166,36,78,1) 100%);background: -webkit-linear-gradient(90deg, rgba(166,36,78,1) 0%, rgba(0,0,0,1) 5%, rgba(0,0,0,1) 95%, rgba(166,36,78,1) 100%);background: linear-gradient(90deg, rgba(166,36,78,1) 0%, rgba(0,0,0,1) 5%, rgba(0,0,0,1) 95%, rgba(166,36,78,1) 100%);filter: progid
XImageTransform.Microsoft.gradient(startColorstr="#a6244e",endColorstr="#a6244e",GradientType=1);
I’m specifically wondering:
I am considering using a CSS gradient for the background of my website, and I wanted to get some feedback on whether it's a good practice. Here's the CSS code I'm using for the background:
background: rgb(166,36,78);background: -moz-linear-gradient(90deg, rgba(166,36,78,1) 0%, rgba(0,0,0,1) 5%, rgba(0,0,0,1) 95%, rgba(166,36,78,1) 100%);background: -webkit-linear-gradient(90deg, rgba(166,36,78,1) 0%, rgba(0,0,0,1) 5%, rgba(0,0,0,1) 95%, rgba(166,36,78,1) 100%);background: linear-gradient(90deg, rgba(166,36,78,1) 0%, rgba(0,0,0,1) 5%, rgba(0,0,0,1) 95%, rgba(166,36,78,1) 100%);filter: progid
I’m specifically wondering:
- Is it efficient to use gradients like this for backgrounds, especially with the browser prefixes for compatibility?
- Does this gradient code impact the performance of the page load time, or are there better alternatives?
- Is there any issue with supporting older browsers using the filter for Internet Explorer?