效果圖
代碼
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.li1{
display:inline-block;
position:relative;
margin-right:5px;
line-height:50px;
height:50px;
width:232px;
background:#EBEBEB;
text-align:center;
margin-right: 5px;
}
/*對li前面進行修改*/
.li1:before {
position:absolute;
left:0;
top:0;
height:0;
width:0;
border-bottom:25px inset transparent;
border-left:25px solid #fff;
border-top:25px inset transparent;
content:""
}
/*對li後面進行修改*/
.li1:after {
position:absolute;
right:-25px;
top:0;
height:0;
width:0;
border-bottom:25px inset transparent;
border-left:25px solid #EBEBEB;
border-top:25px inset transparent;
content:"";
z-index:2
}
/*選中狀態*/
.active{
color:#fff;
background:#FF6162;
}
.active:after {
border-left-color:#FF6162
}
/*第一個li*/
.li1:first-child:before{
border: 0
}
/*最後一個li*/
.li1:last-child:after{
border: 0
}
</style>
</head>
<body>
<ul>
<li class="li1 active" style="z-index: 5;">開始</li>
<li class="li1 " style="z-index: 4;">開始進行</li>
<li class="li1 " style="z-index: 3;">進行中</li>
<li class="li1 " style="z-index: 2;">結束進行</li>
<li class="li1 " style="z-index: 1;">完成</li>
</ul>
</body>
</html>