css支持高版本浏览器即可
实现代码如下:
<section class="row-step">
<span>1.Add Address</span>
<span>2.Select Shipping Method</span>
<span>3.Pay</span>
</section>
$height: 1rem;
.row-step {
background: $background;
display: flex;
height: $height;
>span {
flex: 1 0 auto;
padding: $gutter;
position: relative;
&:not(:last-child) {
&:before {
content: '';
position: absolute;
top: 0;
right: 0;
border-left: $gutter solid $lightest;
border-top: $height/2 solid transparent;
border-bottom: $height/2 solid transparent;
height: 0;
width: 0;
}
&:after {
content: '';
position: absolute;
top: 0;
right: 1px;
border-left: $gutter solid $background;
border-top: $height/2 solid transparent;
border-bottom: $height/2 solid transparent;
height: 0;
width: 0;
}
}
}
}
效果图:

以上是我以前写的一个面包屑的css代码,主要原理就是:需要做两个小三角,一个是背景色,一个是边框色,然后利用定位重叠在一起,记住他们的定位要相差一个像素。
详细了解可以参考:三种纯CSS实现三角形的方法
补充:
也可以使用一些字体图标中的三角图标实现,很容易,比如Font Awesome 字体图标中的chevron-right图标。