Ordered list rendered as flexbox doesn't show bullets/decimals (items also rendered as flexbox)

前端 未结 1 1471
感情败类
感情败类 2021-02-14 21:06

I have an ordered list (ol) that has it\'s display property set to flex. Also the list items are rendered as flexboxes. Doing this results

相关标签:
1条回答
  • 2021-02-14 21:43

    list-style applies to elements with display: list-item only – so by making your LI display: flex, you are removing the prerequisite for list-style to have any effect.

    Using a counter is probably your best bet here.

    https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Lists_and_Counters/Using_CSS_counters

    0 讨论(0)
提交回复
热议问题