Jump to content
Toggle menu
  • 3 articles
  • 75 files
  • 7 users
  • 37.9K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Box-shadow/doc: Difference between revisions

Template page
tt > code
m this remark is pointless; every modern browser has supported the property for years now
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Documentation subpage}}
{{TemplateBox
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
  |1        = 1
  |1label  = X-offset
  |1d-en    = Specify the offset of the shadow to the right of the element. Use negative value for a shadow to the left.
  |1aliases = <!-- List of aliases, separated by / (a slash) -->
  |1type    = line
  |1def    = 4px
  |1stat    = optional


This template is a shortcut for producing shadows. It generates the CSS for various browsers. Supported browsers are the current versions of Opera, Firefox, Safari, Chrome and Internet Explorer 9.
  |2        = 2
  |2label  = Y-offset
  |2d-en    = Specify the offset of the shadow below the element. Use negative value for a shadow above.
  |2aliases =
  |2type    = line
  |2def    = 4px
  |2stat    = optional


=== Usage ===
  |3        = 3
  |3label  = blur radius
  |3d-en    = The width of blurring added to the shadow border
  |3aliases =  
  |3type    = line
  |3def    = 4px
  |3stat    = optional


Insert this template within a style tag of any element:
  |4        = 4
  |4label  = color
  |4d-en    = CSS color of the shadow
  |4aliases =
  |4type    = line
  |4def    = #CCC
  |4stat    = optional


<code><nowiki>{{box-shadow | X-offset | Y-offset | blur radius | #color}}</nowiki></code>
  |name              = box-shadow
 
  |desc              = This template is a shortcut for producing shadows. It should be used in the style attribute of an HTML element (or wiki table etc.).
* <code>X-offset</code> and <code>Y-offset</code> – Specify the offset of the shadow to the right and below the element. Use negative values for a shadow to the left and above. Default is 4px.
  |usage-notes        =
* <code>blur radius</code> – Specifies the width of blurring added to the shadow border. Default is 4px.
  |namespace          =
* <code>color</code> – Specifies the color of the shadow. Default is <code>#CCC;</code>.
  |usergroup          =
 
  |shorthand          =
=== Example ===
  |mustbesubst        =
  |setscats          =
  |placement          =
  |example            =
  |example-value      =
  |relieson          =
  |seealso            =
* {{tl|border-radius}}
* {{tl|linear-gradient}}
* {{tl|radial-gradient}}
  |print              =
  |type              =
  |i18n-method        = -
  |i18n-desc          =  
  |i18n-subpage      =  
  |i18n-mediawiki-msg =  
  |useTemplateData    = only
}}


== Example ==
* <code>&lt;div style="background-color: #FFFFDD; border: 1px solid #808000; padding: 5px; '''<nowiki>{{box-shadow}}</nowiki>'''">Lorem ipsum...&lt;/div></code> will produce a box with the default border shadow:  
* <code>&lt;div style="background-color: #FFFFDD; border: 1px solid #808000; padding: 5px; '''<nowiki>{{box-shadow}}</nowiki>'''">Lorem ipsum...&lt;/div></code> will produce a box with the default border shadow:  


Line 23: Line 65:


<div style="background-color: #FFFFDD; border: 1px solid #808000; padding: 5px; {{box-shadow|4px|4px|8px|#A0A080}}">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
<div style="background-color: #FFFFDD; border: 1px solid #808000; padding: 5px; {{box-shadow|4px|4px|8px|#A0A080}}">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
=== See also ===
* {{tl|border-radius}}
* {{tl|linear-gradient}}
* {{tl|radial-gradient}}
<includeonly>
<includeonly>
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
<!-- CATEGORIES HERE, THANKS -->
[[Category:Cross-browser compatibility templates]]
[[Category:Cross-browser compatibility templates]]
[[fa:الگو:Box-shadow]]
[[en:Template:Box-shadow]]
[[ja:Template:Box-shadow]]
[[ru:Шаблон:Box-shadow]]
[[sk:Šablóna:Tieň]]
[[sq:Stampa:Hija]]
[[uk:Шаблон:Box-shadow]]
</includeonly>
</includeonly>
Cookies help us deliver our services. By using our services, you agree to our use of cookies.