Skip to content

Instantly share code, notes, and snippets.

@dreamark
Created June 7, 2016 07:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dreamark/a49c85de7b76963d75a365d2f5146889 to your computer and use it in GitHub Desktop.
Save dreamark/a49c85de7b76963d75a365d2f5146889 to your computer and use it in GitHub Desktop.
/* 目次 */
.table-of-contents{
margin:24px 0;
background: #e5e5e5;
border: 1px solid #ccc;
width: 70%;
padding: 2em;
counter-reset: toc;
list-style-type: none;
font-size: 0.9em;
}
.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