# வார்ப்புரு:Linear-gradient/doc



This template creates a gradient background. This currently works in Firefox (3.6 and up), Opera (11.10 and up), Safari (5.1 and up), Google Chrome (10 and up) and Internet Explorer (10 and up).  

## Usage

Use within a CSS style tag. The template uses the <code>background-image</code> property.  

<code></code>  

1. <code>start position</code> – Mandatory. Specify a start point: <code></code>, <code>top</code>, <code></code> or <code>bottom</code>, or a combination of two of each, e.g. <code>top </code>. This provides eight starting points.
1. <code>color</code> – The first two colors are mandatory. You can define any number of additional colors, separated with commas.
1. <code>stop</code> – Optional. You can specify a stop position for each color using a percentage (e.g. 45%) or pixels (e.g. ).

## Technical notes

Unlike , this template does *not* assign a default background-color, and therefor does not provide an automatic fallback for browsers that do not support gradients. To provide a fallback, always specify a background color *in front* of the template. This allows for much more flexibility in design and fallback handling in unsupported browsers.  

This template uses the new CSS3 properties for linear gradients: <code>-moz-linear-gradient</code>, <code>-o-linear-gradient</code>, <code>-webkit-linear-gradient</code> and <code>linear-gradient</code> It does not use the legacy <code>-webkit-gradient</code> property due to its deviating parameter format. This means that this template does not work in Safari versions below 5.1 and Google Chrome versions below 10.  

## Examples

- <code></code> will produce

<div>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>  

- <code></code> will produce

<div>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>  

- <code></code> will produce

<div>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>  

## Considerations

Above examples use contrasting colors to show the effect more clearly. It is best to use subtle differences in color to enhance the appearance, rather than radically change it. This also minimizes the effects between browsers that do and do not support gradients.  

## Compatibility
- See linear-gradient on the Mozilla Developer Network for all browser compatibility details.