css 虚线

// 横向虚线
.dash-horizontal {
  width: 100%;
  height: 1px;
  background-image: linear-gradient(to right,
      #ddd 0%,
      #ddd 50%,
      transparent 50%);
  background-size: 8px 1px;
  background-repeat: repeat-x;
}

// 竖向虚线
.dash-vertical {
  height: 100%;
  width: 1px;
  background-image: linear-gradient(to bottom,
      #ddd 0%,
      #ddd 50%,
      transparent 50%);
  background-size: 1px 8px;
  background-repeat: repeat-y;
}

 

 

 

记录进步!!!

posted @ 2022-07-20 09:28  玛卡巴鉲  阅读(111)  评论(0编辑  收藏  举报