css 实现面包屑导航样式--直接上代码
body,div,ul,li,a{
margin: 0;
padding: 0;
list-style: none;
}
#crumbs ul li {
float: left;
margin-right: 10px;
}
#crumbs ul li a {
display: block;
height: 50px;
background: #3498db;
text-align: center;
padding: 30px 40px 0 40px;
position: relative;
margin: 0 20px;
font-size: 20px;
text-decoration: none;
color: #fff;
}
#crumbs ul li a:after {
content: "";
border-top: 40px solid transparent;
border-bottom: 40px solid transparent;
border-left: 40px solid #3498db;
position: absolute;
right: -40px;
top: 0;
z-index: 5;
}
#crumbs ul li a:before {
content: "";
border-top: 40px solid #3498db;
border-bottom: 40px solid #3498db;
border-left: 40px solid transparent;
position: absolute;
left: -40px;
top: 0;
}
#crumbs ul li:first-child a {
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
}
#crumbs ul li:first-child a:before {
display: none;
}
#crumbs ul li:last-child a {
padding-right: 80px;
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
}
#crumbs ul li:last-child a:after {
display: none;
}
#crumbs ul li a:hover {
background: #fa5ba5;
}
#crumbs ul li a:hover:after {
border-left-color: #fa5ba5;
}
#crumbs ul li a:hover:before {
border-top-color: #fa5ba5;
border-bottom-color: #fa5ba5;
}