/demo/css/counters.css
http://samaxesjs.googlecode.com/ · CSS · 56 lines · 44 code · 12 blank · 0 comment · 0 complexity · 87f9aaeaf7d911bbcc0e164de148e9db MD5 · raw file
- body {
- counter-reset: section1;
- }
-
- h1 {
- counter-increment: section1;
- counter-reset: section2;
- }
-
- h1:before {
- content: counter(section1) " ";
- }
-
- h2 {
- counter-increment: section2;
- counter-reset: section3;
- }
-
- h2:before {
- content: counter(section1) "." counter(section2) " ";
- }
-
- h3 {
- counter-increment: section3;
- counter-reset: section4;
- }
-
- h3:before {
- content: counter(section1) "." counter(section2) "." counter(section3) " ";
- }
-
- h4 {
- counter-increment: section4;
- counter-reset: section5;
- }
-
- h4:before {
- content: counter(section1) "." counter(section2) "." counter(section3) "." counter(section4) " ";
- }
-
- h5 {
- counter-increment: section5;
- counter-reset: section6;
- }
-
- h5:before {
- content: counter(section1) "." counter(section2) "." counter(section3) "." counter(section4) "." counter(section5) " ";
- }
-
- h6 {
- counter-increment: section6;
- }
-
- h6:before {
- content: counter(section1) "." counter(section2) "." counter(section3) "." counter(section4) "." counter(section5) "." counter(section6) " ";
- }