模板:Least
目的
This template can be used to restrict the size of an image displayed in an Infobox. It allows the editor to specify the width of an image. If the requested value is greater than the maximum value then the maximum value is returned. Otherwise the requested value is returned. It is designed to fail gracefully.
用法
If the requested value is greater than the maximum value then the maximum value is returned.
If the requested value is less than the maximum value then the requested value is returned.
If the requested value is undefined or non numeric then the maximum value is returned.
If the maximum value is undefined then the result is undefined.
例子
{{least|200|100}}
--> 100
{{least|100|200}}
--> 100
{{least||200}}
--> 200
{{least|100px|200}}
--> 200
{{least|200}}
-->
参见
上述文档嵌入自Template:Least/doc。 (编辑 | 历史) 编者可以在本模板的沙盒 (创建 | 镜像)和测试样例 (创建)页面进行实验。 请在/doc子页面中添加分类。本模板的子页面。 |