Skip to content

Instantly share code, notes, and snippets.

@dreamark
Last active May 28, 2016 10:15
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/02e7277ea63db722b74ef2bdcbdd48ca to your computer and use it in GitHub Desktop.
Save dreamark/02e7277ea63db722b74ef2bdcbdd48ca to your computer and use it in GitHub Desktop.
/* 目次 */
.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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment