其他分享
首页 > 其他分享> > css 虚线

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;
}

 

 

 

记录进步!!!

标签:repeat,50%,1px,虚线,background,css,ddd
来源: https://www.cnblogs.com/sxdjy/p/16496663.html