HTML + CSS: Ordered List without the Period?

后端 未结 6 1910
再見小時候
再見小時候 2020-11-27 03:05

I think the answer to this question is no... but does anyone know of a an HTML/CSS way to create an ordered list without a period after the numbers? Or, alternatively, to sp

6条回答
  •  孤城傲影
    2020-11-27 03:21

    You can add the numbers later using jQuery:

    $("ul").each(function() {
       $(this).find("li").each(function(index) {
          $(this)
            .css("list-style-type", "none")
            .prepend("
    " + (index + 1) + "
    "); }) })

    Try the sample here.

    More info on jQuery here.

提交回复
热议问题