我有我的模板,在大多数情况下它确实有效,有两件事是错误的。我希望进度条在页面左侧对齐,并且我还希望显示百分比。
<div style="
width:{{{width|25%}}};
{{#ifeq: {{{center|yes}}} | yes |
margin:auto;
text-align:center;}}">
{{#ifeq: {{{header|yes}}} | yes
| <p>
{{{text|completed <small>(estimate)</small>}}}
</p>
}}
<p style="border:{{{border|1px solid gray}}}; padding:{{{padding|1px}}}; overflow:hidden;">
<span style="
width: {{#expr: {{{1|<noinclude>2</noinclude>0}}} / {{{total|100}}} * 100}}%;
height: {{{height|2}}}px;
background:{{{color1|#5FDB00}}};
float:left;"> </span>
<span style="
width:{{#expr: 100 - {{{1|<noinclude>2</noinclude>0}}} / {{{total|100}}} * 100}}%;
height:{{{height|2}}}px;
background:{{{color2|#efefef}}};
float:left;
"> </span>
</p>
</div>
我的例子
{{Progress bar|90|text=KTG Image Rebuild}}
在此示例中,任务已完成 90%,但未显示在进度条上或上方。