CSS styling for horizontal list with bullet only between elements

后端 未结 11 2361
刺人心
刺人心 2020-12-09 07:23

I\'m not sure how to build a horizontal list that looks like this:

\"Centered

11条回答
  •  心在旅途
    2020-12-09 08:09

        ul li {
            display: inline;
            text-align: center
        }
    
      .separator {
            display: inline-block;
            background-color: black;
            width: 5px;
            height: 5px;
            border-radius: 45px;
            vertical-align: middle;
    
        }
    
    • item 1
    • item 2
    • item 3
    • item 4
    • item 5

    You can also build this in JavaScript using a loop and concatenating a new li for x amount of list items but seeing as your post doesnt say anything about a dynamically generated list I'll leave it just as this for now.

提交回复
热议问题