User:Purple Wrench/crop-me-do
From Homestar Runner Wiki
< User:Purple Wrench(Difference between revisions)
(a handy cropping template) |
m (newline) |
||
Line 8: | Line 8: | ||
: <code>left</code> and <code>top</code> - the offset of the result, in pixels. Must be positive. Defaults to the origin. | : <code>left</code> and <code>top</code> - the offset of the result, in pixels. Must be positive. Defaults to the origin. | ||
: <code>image</code> - the image to be cropped. | : <code>image</code> - the image to be cropped. | ||
- | </noinclude> | + | </noinclude><includeonly><div style="display: {{{display|inline-block}}}; overflow:hidden; width: {{{width}}}px; height: {{{height}}}px; position: relative"><div style="left: -{{{left|0}}}px; top: -{{{top|0}}}px; position: absolute;">{{{image}}}</div></div></includeonly> |
- | <includeonly><div style="display: {{{display|inline-block}}}; overflow:hidden; width: {{{width}}}px; height: {{{height}}}px; position: relative"><div style="left: -{{{left|0}}}px; top: -{{{top|0}}}px; position: absolute;">{{{image}}}</div></div></includeonly> | + |
Current revision as of 00:38, 22 August 2021
A handy cropping template.
Parameters:
-
display
- the CSS display value (defaultinline-block
) -
width
andheight
- the width and height of the result, in pixels. Must be positive. -
left
andtop
- the offset of the result, in pixels. Must be positive. Defaults to the origin. -
image
- the image to be cropped.