search

Home  >  Q&A  >  body text

How to create a vertical line with multiple points using CSS?

I'm trying to create a vertical line using CSS with multiple points. However, I'm not quite sure how to do that.

Can someone help me solve this problem?

I want to create something like this here.

P粉001206492P粉001206492281 days ago391

reply all(2)I'll reply

  • P粉376738875

    P粉3767388752024-02-22 09:50:25

    You can use SVG images here.

    
      
        
          
          
        
      
      
      
    

    reply
    0
  • P粉132730839

    P粉1327308392024-02-22 09:04:39

    I hope the code below can help you solve your problem. If you need more you can do a Google search using the Vertical Wizard and get additional code like this:

    ul {
      list-style: none;
      margin: 0;
      padding: 0;
      position: relative;
    }
    
    ul:before {
      content: "";
      display: inline-block;
      width: 2px;
      background: red;
      position: absolute;
      left: 3px;
      top: 5px;
      height: calc(100% - 10px);
    }
    
    ul li {
      position: relative;
      padding-left: 15px;
      margin-bottom: 15px;
    }
    
    ul li:before {
      content: "";
      display: inline-block;
      width: 8px;
      height: 8px;
      background: red;
      position: absolute;
      left: 0;
      top: 5px;
      border-radius: 10px;
    }
    • item 1
    • item 2
    • item 3
    • item 4
    • item 5

    reply
    0
  • Cancelreply