Template:Transform-rotate/doc: Difference between revisions

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Content deleted Content added
No edit summary
No edit summary
 
(5 intermediate revisions by one other user not shown)
Line 8: Line 8:
|1stat = required
|1stat = required


|2 = display
|name =RotateStyle
|2d-en = by default rotation is accompanied by <code>display:inline-block</code>, as it rotates around center. Use this parameter to change this default.
|desc =Template which sets the ''style'' of the HTML <nowiki><span></nowiki> tag in such a way that the image in the <nowiki><span></nowiki> section is rotated.
|2label = display
|2aliases = <!-- List of aliases, separated by / (a slash) -->
|2type = string
|2def = ''inline-block''
|2stat = optional-

|name =Transform-rotate
|desc =Rotate any HTML element. Template sets the ''style'' of the HTML <nowiki><span></nowiki> or <nowiki><div></nowiki> tag in such a way that the image or other content of the section is rotated. It uses CSS3 Transforms, see [http://caniuse.com/transforms2d here] for support by different browsers.
|namespace =
|namespace =
|usergroup =
|usergroup =
Line 21: Line 29:
|i18n-mediawiki-msg =
|i18n-mediawiki-msg =
|i18n-subpage =
|i18n-subpage =
|seealso = {{tl|Compass rose file}}
|seealso = {{tl|Compass rose file}}, {{tl|Rotate}}
|setscats =
|setscats =
|lines =
|lines =
Line 30: Line 38:


==Examples ==
==Examples ==
<code><nowiki><span style="{{RotateStyle|315}}">[[File:North Pointer.svg|20px|link=|alt=]]</span></nowiki></code> gives "<span style="{{RotateStyle|315}}">[[File:North Pointer.svg|20px|link=|alt=]]</span>"
<code><nowiki><span style="{{Transform-rotate|315}}">[[File:North Pointer.svg|20px|link=|alt=]]</span></nowiki></code> gives "<span style="{{Transform-rotate|315}}">[[File:North Pointer.svg|20px|link=|alt=]]</span>"

<code><nowiki><span style="{{Transform-rotate|30}}">[[File:Albert Einstein Head.jpg|100px]]</span></nowiki></code> gives <br/>"<span style="{{Transform-rotate|30}}">[[File:Albert Einstein Head.jpg|100px]]</span>"

<code><nowiki><div style="{{Transform-rotate|45}}">[[File:Commons-logo.svg|90px|thumb|hello]]</div></nowiki></code> gives <br/>"<div style="{{Transform-rotate|45}}">[[File:Commons-logo.svg|90px|thumb|hello]]</div>"




<includeonly>
<code><nowiki><span style="{{RotateStyle|45}}">[[File:Albert Einstein Head.jpg|100px]]</span></nowiki></code> gives <br/>"<span style="{{RotateStyle|45}}">[[File:Albert Einstein Head.jpg|100px]]</span>"
[[Category:Cross-browser compatibility templates]]
[[Category:Rotation]]
</includeonly>

Latest revision as of 13:26, 8 January 2014

Rotate any HTML element. Template sets the style of the HTML <span> or <div> tag in such a way that the image or other content of the section is rotated. It uses CSS3 Transforms, see here for support by different browsers.

Usage

{{Transform-rotate |1= }}

Template parameters

ParameterDescriptionDefaultStatus
1angleRotation angle measured in degrees clockwise (°↻) from the up-pointing vector.emptyrequired
displaydisplayby default rotation is accompanied by display:inline-block, as it rotates around center. Use this parameter to change this default.inline-blockoptional

Additional information

The template is intended to be used in the following namespaces: no namespace specified

The template is intended to be used by the following user groups: no user group specified

See also

Localization

This template is not intended to be localized.

Examples

<span style="{{Transform-rotate|315}}">[[File:North Pointer.svg|20px|link=|alt=]]</span> gives ""

<span style="{{Transform-rotate|30}}">[[File:Albert Einstein Head.jpg|100px]]</span> gives
""

<div style="{{Transform-rotate|45}}">[[File:Commons-logo.svg|90px|thumb|hello]]</div> gives
"

hello

"