今天在掘金上看见了一楼主自定义的虚线边框,感觉很不错,学习了
hdj
div {
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);
}
语法:
linear-gradient =
= [left | right] || [top | bottom]
=[|]?