changing decimal prefix/suffix in numbered lists
Most browsers display order开发者_JAVA技巧ed lists like this:
1. foo
2. bar
3. baz
Is there a way to change the numbering to use a prefix instead:
#1 foo
#2 bar
#3 baz
this is the best I could come up with, only tested in Firefox and Chrome thou
<style>
  #hol-list li {
    list-style-position: inside; 
    list-style-type: decimal;
    position: relative;
  }
  #hol-list li:before {
    content: "\0023";
    position:absolute;
    left: -10px;
  }
</style>
<ol id="hol-list">
<li>first item</li>
  <li>second item</li>
  <li>third item</li>
</ol>
you can use
list-style-type: 
list-style-position: 
list-style-image: 
to control it
 加载中,请稍侯......
      
精彩评论