Created
May 28, 2016 09:42
-
-
Save dreamark/20f281b84dbeea46a87acbd05199729e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 目次 */ | |
.table-of-contents{ | |
margin:24px 0; | |
width: 70%; | |
font-size: 0.9em; | |
background: #e5e5e5; | |
border: 1px solid #ccc; | |
padding: 2em; | |
counter-reset: toc; | |
list-style-type: none; | |
} | |
.table-of-contents:before{ | |
margin: 0 auto; | |
content: "目次"; | |
font-size: 1.2em; | |
} | |
.table-of-contents ul{ | |
margin-bottom: 0.5em; | |
counter-reset: toc; | |
list-style-type: none; | |
} | |
.table-of-contents li:before { | |
counter-increment: toc; | |
content: counters(toc, ".") " "; | |
} | |
.table-of-contents li, | |
.table-of-contents ul{ | |
padding: 0 0 0 1em; | |
} | |
.table-of-contents h1:before { | |
counter-increment: toc; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment