面包屑导航条

面包屑导航不是按分类进行,而是有一个层级关系。

效果图如下:

	<style type="text/css">
		ul {list-style: none;}
		ul li a {
			float: left;
			margin-right: 30px;
			display: inline-block;
			position: relative;
			height: 30px;
			padding: 10px 20px 0 20px;
			text-align: center;
			text-decoration: none;
			color: #fff;
			font-size: 20px;
			background: #3498db;
		}
		li a:after {
			content: "";
			border-left: 20px solid #3498db;
			border-top: 20px solid transparent;
			border-bottom: 20px solid transparent;
			position: absolute;
			right: -20px;
			top: 0;
		}
		li a:before {
			content: "";
			border-left: 20px solid transparent;
			border-top: 20px solid #3498db;
			border-bottom: 20px solid #3498db;
			position: absolute;
			left: -20px;
			top: 0;
		}
		ul li:first-child a {
			border-top-left-radius: 10px;
			border-bottom-left-radius: 10px;
		}
		ul li:first-child a:before {
			display: none;
		}
		ul li:last-child a {
			border-top-right-radius: 10px;
			border-bottom-right-radius: 10px;
		}
		ul li:last-child a:after {
			display: none;
		}
		li a:hover {
			background: #fa5ba5;
		}
		li a:hover:after {
			border-left-color: #fa5ba5;
		}
		li a:hover:before {
			border-top-color: #fa5ba5;
			border-bottom-color: #fa5ba5;
		}
	</style>

  

 
<body>
	<ul>
		<li><a href="#">中国</a></li>
		<li><a href="#">北京</a></li>
		<li><a href="#">天安门</a></li>
		<li><a href="#">升旗仪式</a></li>
	</ul>
</body>

  

demo参考于此链接: 面包屑导航

猜你喜欢

转载自www.cnblogs.com/hys-blog/p/9827466.html