Html
    Css
    Js

    
                        
.nav li {
	list-style:none;
	position:relative;
	display:inline-block;
	padding:20px 15px 5px 15px;
	margin-left:-10px;
	color:#fff;
	cursor:pointer;
}
.nav li::after {
	content:'';
	position:absolute;
	top:0;
	bottom:0;
	left:0;
	right:0;
	z-index:-1;
	background:#427DE9;
	border:1px solid #fff;
	border-top-right-radius:8px;
	border-top-left-radius:8px;
	transform:perspective(0.5em) rotateX(5deg);
	transform-origin:bottom;
}
.nav li:hover::after {
	background:#39a3f5;
}

                        
↑上面代码改变,会自动显示代码结果 jQuery调用版本:1.10.2
 立即下载

css梯形导航条

0