Last active
June 9, 2017 02:24
-
-
Save yuririn/2c4cd588ff0ca1171851c930ee4f8dfd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/* css */ | |
.list-family ol{ | |
list-style: none; | |
counter-reset: cnt; | |
padding-left: 0; | |
} | |
.list-family ol li{ | |
margin-bottom: 8px; | |
} | |
.list-family ol li::before{ | |
content: counters(cnt, ".") ". "; | |
counter-increment: cnt; | |
} | |
.list-family ol ol{ | |
counter-reset: cnt; | |
margin-left: 20px; | |
margin-top: 8px; | |
margin-bottom: 0; | |
} | |
<!-- html --> | |
<div class="list-family"> | |
<ol> | |
<li>リスト</li> | |
<li>リスト | |
<ol> | |
<li>子リスト</li> | |
<li>子リスト</li> | |
</ol> | |
</li> | |
<li>リスト</li> | |
<li>リスト | |
<ol> | |
<li>子リスト</li> | |
<li>子リスト | |
<ol> | |
<li>孫リスト</li> | |
<li>孫リスト</li> | |
</ol> | |
</li> | |
</ol> | |
</li> | |
</ol> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment