模板:Simple bar

於 2024年7月12日 (五) 14:29 由 Gekokujo.hks留言 | 貢獻 所做的修訂 (建立內容為「<div style="display: inline-block; position: relative; width: {{{width|200}}}px;" title="{{#expr: {{{1|50}}} }}"> {{#ifexpr: {{{text-size|0}}} | <div style="display: inline-block; position: absolute; left: 0; top: {{#expr: ({{{height|15}}} - {{{text-size}}}) / 2}}px; line-height: {{{text-size}}}px; font-size: {{{text-size}}}px; font-weight: bold; text-align: center; width: {{#expr:({{{1|50}}})/({{{max|100}}}) * {{{width|200}}} round 0}}px; color: {{{text-c…」的新頁面)
(差異) ←上個修訂 | 最新修訂 (差異) | 下個修訂→ (差異)
-{zh-cn:文档; zh-tw:文件;}-图示 模板文件[檢視] [編輯] [歷史] [清除快取]

Usage

{{Simple bar
| number
| max        = 
| width      = 
| height     = 
| text-size  = 
| text-color = 
| bar-color  = 
}}
{{Simple bar|number|width= |height= |max= |text-size= |text-color= |bar-color=}}
Parameter name Description Default Notes
The value to display. 50 REQUIRED
max The maximum value for the bar. 100
width The width of the bar, in pixels. 200
height The height of the bar, in pixels. 15
text-size If set to a non-zero value, it causes the value to be displayed over the bar. The font size of the text is the value of text-size. 0
text-color The color of the text. #000000
bar-color The color of the bar. #ffa500

Example

{{-{}-Simple bar|500|width=400|max=1000|height=20|text-size=12|text-color=white|bar-color=red}}

500