//1px的实现 border($border-width = 1px, $border-color = #ccc, $border-style = solid, $radius = 0) // 为边框位置提供定位参考 position: relative; if $border-width == null $border- 0; border-radius: $radius; &::after // 用以解决边框layer遮盖内容 pointer-events: none; position: absolute; z-index: 999; top: 0; left: 0; // fix当元素宽度出现小数时,边框可能显示不全的问题 // overflow: hidden; content: "