Skip to content

Border 边框

虚线边框

参考 1 参考 2

.border-dotted {
  padding: 1em;
  border: 1px dashed transparent;
  background: linear-gradient(white, white) padding-box, repeating-linear-gradient(
      -45deg,
      #ccc 0,
      #ccc 0.25em,
      white 0,
      white 0.75em
    );
}