css实现带箭头的流程条

直接上效果图: 

                <ul class="navs">
                    <li>1</li>
                    <li>2</li>
                    <li>3</li>
                    <li>4</li>
                </ul>    

  

			.navs {
				height: 100px;
			}
			.navs li {
				padding: 0px 10px 0 30px;
				line-height: 40px;
				background: #50abe4;
				display: inline-block;
				color: #fff;
				position: relative;
			}
			
			.navs li:after {
				content: '';
				display: block;
				border-top: 20px solid #50abe4;
				border-bottom: 20px solid #50abe4;
				border-left: 20px solid #fff;
				position: absolute;
				right: -20px;
				top: 0;
			}
			
			.navs li:after {
				content: '';
				display: block;
				border-top: 20px solid transparent;
				border-bottom: 20px solid transparent;
				border-left: 20px solid #50abe4;
				position: absolute;
				right: -20px;
				top: 0;
				z-index: 10;
			}
			
			.navs li:before {
				content: '';
				display: block;
				border-top: 20px solid #50abe4;
				border-bottom: 20px solid #50abe4;
				border-left: 20px solid #fff;
				position: absolute;
				left: 0px;
				top: 0;
			}
			
			.navs li:first-child {
				border-radius: 4px 0 0 4px;
				padding-left: 25px;
			}
			
			.navs li:last-child,
			.cssNavEnd {
				border-radius: 0px 4px 4px 0px;
				padding-right: 25px;
			}
			
			.navs li:first-child:before {
				display: none;
			}
			
			.navs li:last-child:after,
			.cssNavEnd:after {
				display: none;
			}
			
			.navs li.active {
				background-color: #ef72b6;
			}
			
			.navs li.active:after {
				border-left-color: #ef72b6;
			}

最近有点忙,  有空的时候再分析一下实现原理  : )

  

 

转载于:https://www.cnblogs.com/stella1024/p/8259990.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值