自定义虚线边框

.dashed {
    
    
    background-image: linear-gradient(to right, rgba(61, 230, 255, 0.7) 50%, rgba(255, 255, 255, 0) 0%),
    linear-gradient(rgba(61, 230, 255, 0.7) 50%, rgba(255, 255, 255, 0) 0%),
    linear-gradient(to left, rgba(61, 230, 255, 0.7) 50%, rgba(255, 255, 255, 0) 0%),
    linear-gradient(to top, rgba(61, 230, 255, 0.7) 50%, rgba(255, 255, 255, 0) 0%);
    background-position: top, right, bottom, left;
    background-size: 20px 1px, 1px 20px, 20px 1px, 1px 20px;
    background-repeat: repeat-x, repeat-y, repeat-x, repeat-y;
  }

猜你喜欢

转载自blog.csdn.net/qq_44900902/article/details/125720095