background preloader

CSS Gradients

Facebook Twitter

CSS gradient generator. Linear CSS Gradients that ANY Browser Can See | Web Design Dev. In the past, if you wanted to have an HTML entity to have a gradient background you created in image of a gradient and displayed it in the entity using the background-image attribute in CSS. With the evolution of browsers and CSS/HTML, this is no longer the case. In this tutorial we will learn how to use CSS to add a linear gradient to the background of entities. The Setup First, we need to decide how we are going to use the gradient. I suggest using the gradient as an enhancement. Keep in mind that some browsers will not display the gradient well or at all. Gradients can be applied to block elements such as DIV tags. Cool Gradient Goes here Applying the Gradient The Excellent – webkit Now, let’s add our gradient.

Webkit, namely Safari and Chrome, use the following CSS to render a linear gradient. This uses the webkit CSS for creating a gradient. Excellent! The good Firefox uses the Gecko rendering engine. This gives us great results as well. The Tolerable. Ultimate CSS Gradient Generator - ColorZilla.com. /* Permalink - use to edit and share this gradient: */ background: #1e5799; /* Old browsers */ background: -moz-linear-gradient(top, #1e5799 0%, #2989d8 50%, #207cca 51%, #7db9e8 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#1e5799), color-stop(50%,#2989d8), color-stop(51%,#207cca), color-stop(100%,#7db9e8)); /* Chrome,Safari4+ */ background: -webkit-linear-gradient(top, #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%); /* Chrome10+,Safari5.1+ */ background: -o-linear-gradient(top, #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%); /* Opera 11.10+ */ background: -ms-linear-gradient(top, #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%); /* IE10+ */ background: linear-gradient(to bottom, #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%); /* W3C */

GradientFinder - Convert your Images into CSS Gradients.