Àdàkọ:Gradient/doc
Èyí ni ìwé àlàyé ọjọ́ewésubpage fún Àdàkọ:Gradient. Ó ní àlàyé ìlò, àwọn ẹ̀ka àti àkóónú míràn tí wọn kò jẹ́ apá and other content that is not part of the original àdàkọ page. |
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.
Usage
[àtúnṣe àmìọ̀rọ̀]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
[àtúnṣe àmìọ̀rọ̀]
- <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
[àtúnṣe àmìọ̀rọ̀]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
[àtúnṣe àmìọ̀rọ̀]- {{Border-radius}}
- {{Box-shadow}}