Modèle:CompositionBarre : Différence entre versions

De Europe Politique
(Page créée avec « <div style="border-style:solid;border-width:1px;border-color:#c0c0c0;background-color:#f0f0f0;width:100px;height:20px;"><div style="background-color:{{#if:{{{hex|#CCCCCC}}... »)
 
 
(3 révisions intermédiaires par le même utilisateur non affichées)
Ligne 1 : Ligne 1 :
<div style="border-style:solid;border-width:1px;border-color:#c0c0c0;background-color:#f0f0f0;width:100px;height:20px;"><div style="background-color:{{#if:{{{hex|#CCCCCC}}}
+
<div style="border: {{{border-width|1px}}} solid {{{border-color|#c0c0c0}}}; background-color: {{{background-color|#f0f0f0}}}; width: {{{width|100}}}px; height: 1.5em;"><div style="position: absolute; background-color:{{#if:{{both|{{{4|}}}|{{{5|}}}}}
    |{{{hex|#CCCCCC}}}
+
     |rgb({{#expr:255*{{{3|255}}}}},{{#expr:255*{{{4|0}}}}},{{#expr:255*{{{5|0}}}}})
     |rgb({{#expr:255*{{{3|255}}}}},{{#expr:255*{{{4|0}}}}},{{#expr:255*{{{5|0}}}}})}};width:{{#expr:floor(100*{{{1|50}}}/{{{2|100}}})}}px;height:20px;"><div style="font-weight:bold;width:100px;height:22px;" align="center"><abbr title="{{#expr:({{{1|50}}}/{{{2|100}}}*100) round 1}}&nbsp;%">{{formatnum:{{{1|50}}}}}/{{formatnum:{{{2|100}}}}}</abbr></div></div></div>
+
    |{{{hex|{{{3|#CCCCCC}}}}}} }}; width: {{#expr:floor({{{width|100}}}*{{{1|{{#expr:{{{width|100}}}/2}}}}}/{{{2|{{{width|100}}}}}})}}px; height: 1.5em;"></div><div style="position: absolute; font-weight: Normal; width: {{{width|100}}}px; height: 1.5em; text-align: center; z-index: 10; color: {{{color|#000}}};">{{formatnum:{{{1|50}}}}}&nbsp;/&nbsp;{{formatnum:{{{2|100}}}}}{{#if:{{{per|}}}|&nbsp;&nbsp;&nbsp;({{#expr:(({{{1|50}}}/{{{2|100}}})*100)round 0}}%)}}</div></div>

Version actuelle en date du 7 mai 2024 à 09:51

50 / 100