PayPal-donate (Wiki).png
O ile nie zaznaczono inaczej, prawa autorskie zamieszczonych materiałów należą do Jana Woreczko & Wadi.

(Unless otherwise stated, the copyright of the materials included belong to Jan Woreczko & Wadi.)


Szablon:Linear-gradient

Z Wiki.Meteoritica.pl

(i) Dokumentacja (Linear-gradient)


Spis treści

Syntax

Use within a CSS style tag. The template uses the background-image property.

<div style="{{linear-gradient | start position | #color [stop], #color [stop][, #color [stop], ...] }}">Lorem ipsum...</div>

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

Technical notes

Unlike Szablon:Gradient, 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: -moz-linear-gradient, -ms-linear-gradient, -o-linear-gradient, -webkit-linear-gradient and linear-gradient It does not use the legacy -webkit-gradient property due to it's deviating parameter format. This means that this template does not work in Safari versions below 5.1 and Google Chrome versions below 10.

Examples

  • <div style="{{linear-gradient|left|#ffdddd, #ddddff}}; padding:8px">Lorem ipsum...</div> will produce
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Proin nibh augue, suscipit a, scelerisque sed, lacinia in, mi. Cras vel lorem. Etiam pellentesque aliquet tellus. Phasellus pharetra nulla ac diam. Quisque semper justo at risus. Donec venenatis, turpis vel hendrerit interdum, dui ligula ultricies purus, sed posuere libero dui id orci. Nam congue, pede vitae dapibus aliquet, elit magna vulputate arcu, vel tempus metus leo non est. Etiam sit amet lectus quis est congue mollis. Phasellus congue lacus eget neque. Phasellus ornare, ante vitae consectetuer consequat, purus sapien ultricies dolor, et mollis pede metus eget nisi. Praesent sodales velit quis augue. Cras suscipit, urna at aliquam rhoncus, urna quam viverra nisi, in interdum massa nibh nec erat.
(AĄBCĆDEĘFGHIJKLŁMNŃOÓPQRSŚTUVWXYZŹŻ aąbcćdeęfghijklłmnńoópqrsśtuvwxyzźż)


  • <div style="{{linear-gradient|left|#ffdddd, #ddffdd 50%, #ddddff}}; padding:8px">Lorem ipsum...</div> will produce
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Proin nibh augue, suscipit a, scelerisque sed, lacinia in, mi. Cras vel lorem. Etiam pellentesque aliquet tellus. Phasellus pharetra nulla ac diam. Quisque semper justo at risus. Donec venenatis, turpis vel hendrerit interdum, dui ligula ultricies purus, sed posuere libero dui id orci. Nam congue, pede vitae dapibus aliquet, elit magna vulputate arcu, vel tempus metus leo non est. Etiam sit amet lectus quis est congue mollis. Phasellus congue lacus eget neque. Phasellus ornare, ante vitae consectetuer consequat, purus sapien ultricies dolor, et mollis pede metus eget nisi. Praesent sodales velit quis augue. Cras suscipit, urna at aliquam rhoncus, urna quam viverra nisi, in interdum massa nibh nec erat.
(AĄBCĆDEĘFGHIJKLŁMNŃOÓPQRSŚTUVWXYZŹŻ aąbcćdeęfghijklłmnńoópqrsśtuvwxyzźż)


  • <div style="{{linear-gradient|top|#ffdddd, #ddddff}}; {{Box-shadow}}; padding:8px">Lorem ipsum...</div> will produce
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Proin nibh augue, suscipit a, scelerisque sed, lacinia in, mi. Cras vel lorem. Etiam pellentesque aliquet tellus. Phasellus pharetra nulla ac diam. Quisque semper justo at risus. Donec venenatis, turpis vel hendrerit interdum, dui ligula ultricies purus, sed posuere libero dui id orci. Nam congue, pede vitae dapibus aliquet, elit magna vulputate arcu, vel tempus metus leo non est. Etiam sit amet lectus quis est congue mollis. Phasellus congue lacus eget neque. Phasellus ornare, ante vitae consectetuer consequat, purus sapien ultricies dolor, et mollis pede metus eget nisi. Praesent sodales velit quis augue. Cras suscipit, urna at aliquam rhoncus, urna quam viverra nisi, in interdum massa nibh nec erat.
(AĄBCĆDEĘFGHIJKLŁMNŃOÓPQRSŚTUVWXYZŹŻ aąbcćdeęfghijklłmnńoópqrsśtuvwxyzźż)


Linki zewnętrzne

Osobiste