Compteurs dans Firefox
Résolu/Fermé
A voir également:
- Compteurs dans Firefox
- Video downloadhelper firefox - Télécharger - Outils pour navigateurs
- Comment supprimer bing de firefox - Guide
- Exporter favoris firefox - Guide
- Firefox download - Télécharger - Navigateurs
- Dark reader firefox - Guide
1 réponse
Désolé les aminches. Mon message précédent a été envoyé avant que j'aie terminé de l'écrire (d'où la fin abrupte).
Entre-temps, j'ai trouvé la solutoin. Pour ceux que ça intéresse, il ne faut pas faire la remise à zéro dans le pseudo-élément hi:before, mais dans hi.
Voici donc la solution (qui fonctionne dans Firefox 3.04, Opera 9.62 et Google Chrome 0.4.154.29, et qui se dégrade de façon acceptable dans Internet Explorer 7:
h1:before, h2:before, h3:before, h4:before, h5:before, h6:before { color: silver; font-size: 80% } h1:before { color: rgb(166,166,166); }
body { counter-reset: t1; } h1:before { counter-increment: t1; content: counter(t1) " - "; } h1 { counter-reset: t2; } h2:before { counter-increment: t2; content: counter(t1) "." counter(t2) " - "; } h2 { counter-reset: t3; } h3:before { counter-increment: t3; content: counter(t1) "." counter(t2) "." counter(t3) " - "; } h3 { counter-reset: t4; }
h4:before { counter-increment: t4; content: counter(t1) "." counter(t2) "." counter(t3) "." counter(t4) " - "; }
h4 { counter-reset: t5; }
h5:before { counter-increment: t5; content: counter(t1) "." counter(t2) "." counter(t3) "." counter(t4) "." counter(t5) " - "; }
h5 { counter-reset: t6; }
h6:before { counter-increment: t6;
content: counter(t1) "." counter(t2) "." counter(t3) "." counter(t4) "." counter(t5) "." counter(t6) " - "; }
Entre-temps, j'ai trouvé la solutoin. Pour ceux que ça intéresse, il ne faut pas faire la remise à zéro dans le pseudo-élément hi:before, mais dans hi.
Voici donc la solution (qui fonctionne dans Firefox 3.04, Opera 9.62 et Google Chrome 0.4.154.29, et qui se dégrade de façon acceptable dans Internet Explorer 7:
h1:before, h2:before, h3:before, h4:before, h5:before, h6:before { color: silver; font-size: 80% } h1:before { color: rgb(166,166,166); }
body { counter-reset: t1; } h1:before { counter-increment: t1; content: counter(t1) " - "; } h1 { counter-reset: t2; } h2:before { counter-increment: t2; content: counter(t1) "." counter(t2) " - "; } h2 { counter-reset: t3; } h3:before { counter-increment: t3; content: counter(t1) "." counter(t2) "." counter(t3) " - "; } h3 { counter-reset: t4; }
h4:before { counter-increment: t4; content: counter(t1) "." counter(t2) "." counter(t3) "." counter(t4) " - "; }
h4 { counter-reset: t5; }
h5:before { counter-increment: t5; content: counter(t1) "." counter(t2) "." counter(t3) "." counter(t4) "." counter(t5) " - "; }
h5 { counter-reset: t6; }
h6:before { counter-increment: t6;
content: counter(t1) "." counter(t2) "." counter(t3) "." counter(t4) "." counter(t5) "." counter(t6) " - "; }