<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
a {
text-decoration: none;
color: black;
}
.breadcrumb{
display: inline-block;
overflow: hidden;
border-radius: 5px;
font-size: 1.1em;
text-align: center;
}
.breadcrumb a {
/* border: 1px solid;*/
display: block;
line-height: 36px;
background-color: paleturquoise;
position: relative;
float: left;
padding: 10px 50px 10px 70px ;
}
/*实现导航的三角图形*/
.breadcrumb a:after {
content: "";
position: absolute;
z-index: 1;
top:10px;
right: -18px;/*让画出的正方形位于每个导航右边border的中间*/
width: 36px;
height: 36px;
background: paleturquoise;
transform: scale(1.15) rotate(45deg);/*让画出的正方形翻转45度,模拟出最后出现的三角效果*/
box-shadow:5px -5px 0 4px rgba(255, 255, 255, 1);
/*box-shadow: h-shadow v-shadow blur spread color inset;实现各个导航中间的白色效果
注意:x轴和y轴的值要比阴影的值大。
*/
}
.breadcrumb a:last-child:after {
content: none;
}
.breadcrumb a:hover, .breadcrumb a:hover:after{
background-color:skyblue;
}
</style>
</head>
<body>
<div class="breadcrumb">
<a href="#">home</a>
<a href="#">goods</a>
<a href="#">order</a>
<a href="#">more</a>
</div>
</body>
</html>