Кеп:Gradient/doc
This template creates a gradient background. This currently works in Firefox (3.6 and up), Safari (4.0 and up) and Google Chrome. In other browsers, it only displays the start color as background color.
Leloran masalla
[нисйан]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.
- 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
[нисйан]- <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
[нисйан]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.
Ḣaźa. qin
[нисйан]- {{Border-radius}}
- {{Box-shadow}}