Template:MirrorV
![]() | 此模板的文档不存在、不全面或不能详细描述其功能及/或其代码中的参数。请帮助扩充并改进其文档。 |
A shorthanded CSS code for vertically mirroring elements inside style attribute. Use it inside the style=""
attribute of HTML elements like other CSS properties.
- Named Parameter
display=
allows to change the CSS display property. It defaults todisplay: inline-block;
When using this template to create the mirrored effect, editors should consider carefully about the accessibility.
說明 This template does not support IE8 or older browsers. IE8 requires cumbersome calculating of matrices. You may implement it into this template if you know how to translate the formula into Lua.
Examples
编辑The mirroring happens at the center of the whole object and its effective dimensions will retain the original values of the object as if unmirrored, so you may adjust the position and padding to avoid unwanted overlapping. Use the display=
parameter to further control positioning.
Syntax | Result |
---|---|
*Some mirrored characters:<br /><span style="{{mirrorV}}">A</span> B <span style="{{mirrorV}}">C</span> D
*Works with numbers, too:<br /><span style="{{mirrorV}}">0</span> 1 <span style="{{mirrorV}}">2</span> 3 <span style="{{mirrorV}}">4</span> 5 <span style="{{mirrorV}}">6</span> 7 <span style="{{mirrorV}}">8</span> 9
*Or with arbitrary text:<br /><span style="{{mirrorV}}">This text<br />is vertically<br />mirrored.</span><br /> <br />This text is not.
|
|
This is a placeholder image:
<div style="position:relative; left:100px; {{mirrorV|display=block}}">[[file:placeholder.png|200px]]</div>
It is mirrored.
|
This is a placeholder image:
It is mirrored. |
See also:
编辑上述文档嵌入自Template:MirrorV/doc。 (编辑 | 历史) 编者可以在本模板的沙盒 (创建 | 镜像)和测试样例 (创建)页面进行实验。 请在/doc子页面中添加分类。本模板的子页面。 |