সাঁচ: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
[সম্পাদনা কৰক]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
[সম্পাদনা কৰক]- <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.
See also
[সম্পাদনা কৰক]- {{border-radius}}
- {{box-shadow}}
The above documentation is transcluded from সাঁচ:Gradient/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories and interwikis to the /doc subpage. Subpages of this template. |