css border dotted line drawing method

As we all know, the dotted line of border has a fixed width. If you need an unlimited width, you can use repeating-linear-gradientthe drawing method

.divider--dashed {
    
    
  // border: dashed;
  border-width: thin;
  // border-color: #e6eaf2;
  border-image: repeating-linear-gradient(
      to right,
      #e6eaf2 0px,
      #e6eaf2 8px,
      transparent 8px,
      transparent 15px
    )
    1 repeat !important;
}

usage

<v-divider class="divider--dashed"></v-divider>

Guess you like

Origin blog.csdn.net/weixin_41886421/article/details/131636427