GRADIENT BACKGROUND |
OverviewDescriptionLearn how to add a gradient background to an entire website or to a specific element by using CSS.DemonstrationTechnical limitations› The code shown in this tutorial will work in all modern browsers, but the gradient effect may fail when displayed in older browsers.InstallationGradient typesThere are three different types of gradients:
Adding a gradientIn this tutorial we will learn to apply gradients to backgrounds. Gradients can be applied elsewhere, but for the sake of this tutorial we will limit ourselves to what's behind the content.In order to add a gradient we start with the
Next, you enter at least two colors inside the parentheses. You define the colors either by using the predefined colors CSS already is packed with (such as
You need to reply to the topic in order to see the code resources Linear gradient directionThe code above will result in a gradient where the gradient is red on the top and blue on the bottom. You can make the gradient go into a different direction by either adding a predefined CSS-direction (
You need to reply to the topic in order to see the code resources Useful links
Notes
|
This resource belong to this community unless differently stated. No reproduction possible without our agreement, in accordance with article L122-1 of the CPI. |