Şablon:Gradient
This template creates a gradient background. This currently works in Firefox (3.6 and up), Opera (11.10 and up), Safari (4.0 and up), Google Chrome and Internet Explorer 10. In other browsers, it only displays the start color as background color.
Usage
[çımeyi bıvurne]Use within a CSS style tag. The template uses the background-color and background-image properties, so best practice is to place it behind any other background properties.
<div style="{{gradient | #start color | #end color | [orientation] | [stop color [| stop position]]}}">Lorem ipsum...</div>
- start color - Mandatory. The start color of the gradient in CSS notation.
- end color - Mandatory. The end color of the gradient in CSS notation.
- orientation - Optional. horizontal (default) or vertical, or specify start point: left, top, right or bottom.
- stop color - Optional. Intermediate color between the start and end color.
- stop position - Optional. Position of the stop color between 0% and 100%. Default is 50%.
Each parameter must be placed in their respective position.
Examples
[çımeyi bıvurne]- <div style="{{gradient|#ffdddd|#ddddff|horizontal}}">Lorem ipsum...</div> will produce
- <div style="{{gradient|#ffdddd|#ddddff|horizontal|#ddffdd|50%}}">Lorem ipsum...</div> will produce
- <div style="{{gradient|#ffdddd|#ddddff|vertical}}">Lorem ipsum...</div> will produce
Considerations
[çımeyi bıvurne]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.
See also
[çımeyi bıvurne]{{Border-radius}}
{{Box-shadow}}