1,先看一下效果图

2,梯形通过定位和设置Border来实现的,平行四边形通过旋转来实现的。

3,代码如下

(1)HTML代码

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
<link rel="stylesheet" href="Style/tab.css" type="text/css" />
<script type="text/javascript">
function JumpTab(url)
{
window.location.href = url;
}
</script>
</head>
<body>
<div class="topNavigation"> <div class="outDv firstOutDv currentlevel">
<div class="innerDv currentlevel">
</div>
<div class="container currstart">
合同会签申请
</div> </div>
<div class="outDv level4" onclick="JumpTab('second.html')">
<div class="innerDv">
</div>
<div class="container next">
合同盖章记录
</div>
</div>
<div class="outDv level3" onclick="JumpTab('three.html')">
<div class="innerDv">
</div>
<div class="container next">
合同生效申请
</div>
</div>
<div class="outDv level2" onclick="JumpTab('four.html')">
<div class="innerDv">
</div>
<div class="container next">
付款50%
</div>
</div>
<div class="outDv level1" onclick="JumpTab('five.html')">
<div class="innerDv">
</div>
<div class="container end">
合同归档记录
</div>
</div>
<div class="endDv" onclick="JumpTab('six.html')">
<div class="innerEndDv">相似合同</div>
</div>
<div class="endDv" onclick="JumpTab('seven.html')">
<div class="innerEndDv">
相关合同
</div>
</div> </div> </body>
</html>

  (2)CSS代码

* {
padding: 0px;
margin: 0px;
} .topNavigation { border-bottom: 5px solid #51A3C9;
padding-right:10px;
width:90%;
margin:auto;
padding-top:20px;
} .firstOutDv {
margin-left: 0px !important;
} .outDv {
border-bottom: 30px solid #b5b5b5;
border-left: 20px solid transparent;
border-right: 20px solid transparent;
width: 125px;
position: relative;
margin-left: -25px;
display: inline-block;
margin-bottom: -4px;
cursor: pointer;
} .innerDv {
border-bottom: 28px solid #f2f2f2;
border-left: 19px solid transparent;
border-right: 19px solid transparent;
width: 123px;
position: absolute;
left: -18px;
top: 1px; } .container {
z-index: 10;
position: absolute;
padding-left: 22px;
background-position-x: 2px;
background-position-y: center;
background-repeat: no-repeat;
height: 30px;
line-height: 30px;
} .start {
background-image: url('/Images/start.png');
} .next {
background-image: url('/Images/next.png');
} .end {
background-image: url('/Images/end.png');
} .currstart {
background-image: url('/Images/currentstart.png');
color: #fff;
} .currnext {
background-image: url('/Images/currentnext.png');
color: #fff;
} .currend {
background-image: url('/Images/currentend.png');
color: #fff;
} .level5 {
z-index: 5;
} .level4 {
z-index: 4;
} .level3 {
z-index: 3;
} .level2 {
z-index: 2;
} .level1 {
z-index: 1;
} .currentlevel {
z-index: 6;
border-bottom: 30px solid #51a3c9;
top: 0px !important;
} .endDv {
width: 100px;
height: 30px;
transform: skew(35deg);
-webkit-transform: skew(35deg);
-moz-transform: skew(35deg);
-o-transform: skew(35deg);
-ms-transform: skew(35deg);
background-color: #E7E7E7;
/* margin: 50px auto; */
display: inline-block;
margin-bottom: -4px;
float: right;
text-align:center;
margin-left:15px;
cursor:pointer;
} .innerEndDv{
transform: skew(-35deg);
-webkit-transform: skew(-35deg);
-moz-transform: skew(-35deg);
-o-transform: skew(-35deg);
-ms-transform: skew(-35deg);
height:30px;
line-height:30px;
cursor:pointer;
}
.currentEnd{
color:#fff;
background-color:#51A3C9;
}

  

Html+Css实现梯形选项卡的更多相关文章

  1. 纯CSS实现tab选项卡切换

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta cont ...

  2. 用html+css+js实现选项卡切换效果

    文章转载自:http://tongling.github.io/JSCards/ 用html+css+js实现选项卡切换效果 使用之前学过的综合知识,实现一个新闻门户网站上的常见选项卡效果: 文字素材 ...

  3. [前端] html+css+javascript 实现选项卡切换效果

    用html+css+js实现选项卡切换效果使用之前学过的综合知识,实现一个新闻门户网站上的常见选项卡效果: 文字素材:房产: 275万购昌平邻铁三居 总价20万买一居 200万内购五环三居 140万安 ...

  4. 各种demo:css实现三角形,css大小梯形,svg使用

    各种demo: 1.css实现正方形 思路:width为0:height为0:使用boder-width为正方形的边长的一半,不占任何字节:border-style为固体:border-color为正 ...

  5. css实现梯形标签页

    html <nav>click me</nav> css nav{ position: relative; display: inline-block; padding: 15 ...

  6. 前端(各种demo)一:css实现三角形,css实现梯形,pop弹层,css伪类before,after使用,svg使用(持续更新中)

    各种demo: 1.css实现正方形 思路:width为0:height为0:使用boder-width为正方形的边长的一半,不占任何字节:border-style为固体:border-color为正 ...

  7. Div+CSS+JQuery实现选项卡,即通过点击不同的li跳转到不同的div中显示不同的内容或者执行不同的操作。

    1.代码 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html>   ...

  8. css 简单梯形

    通过css2D变形我们可以轻松得到平行四边形,那么通过此技巧可以得到梯形吗? no! 不过我们可以通过3D旋转得到类似这样的效果: transform:perspective(0.5em)  rota ...

  9. 【CSS】梯形、平行四边形导航条与毛玻璃效果【转】

    转载出处:http://www.cnblogs.com/Uncle-Keith/p/5943158.html 代码部分有小改动. 导航条对于每一个Web前端攻城狮来说并不陌生,但是毛玻璃可能会相对陌生 ...

随机推荐

  1. C# 2个List<T>比较内部项是否相等(全部相等则相等,反之不相等)

    static void Main(string[] args) { List<string> a = new List<string>() { "a", & ...

  2. arcgis JavaScript 加载 mapbox地图

    mapbox 地图现在是越来越好看了, 随便试 /** * Created by Administrator on 2018/5/15 0015. */ import * as esriLoader ...

  3. Attack Top Chunk之 bcloud

    前言 这是 bctf 2016 的题,链接 https://github.com/ctfs/write-ups-2016/tree/master/bctf-2016/exploit/bcloud-20 ...

  4. redis sortedSet

    zset 和set 相比: zset 类型和set类型一样,不允许有重复的元素.zset是有序的,zset 有一个double类型的分数,这个分数可以重复,zset正是通过这个分数对集合中的元素从小到 ...

  5. with admin option /with grant option

    1. with admin option是用在系统权限上的,with grant option是用在对象权限上的. SQL> grant create synonym to scott with ...

  6. python queue和生产者和消费者模型

    queue队列 当必须安全地在多个线程之间交换信息时,队列在线程编程中特别有用. class queue.Queue(maxsize=0) #先入先出 class queue.LifoQueue(ma ...

  7. zabbix系列之二——安装

    1Getting zabbix Four ways of getting: Index Option note 1 Install it from the distribution packages ...

  8. 4.Servlet过滤器

    1.Servlet 编写过滤器 Servlet 过滤器是可用于 Servlet 编程的 Java 类,有以下目的: 在客户端的请求访问后端资源之前,拦截这些请求. 在服务器的响应发送回客户端之前,处理 ...

  9. Oracle 查看锁情况

    /*查看锁(lock)情况*/ SELECT ls.osuser os_user_name, ls.username user_name, decode(ls.type, 'RW', 'Row wai ...

  10. Mac .DS_Store 隐藏文件和清理.DS_Store的方法

    1.清理.DS_Store的方法 输入命令: sudo find / -name ".DS_Store" -depth -exec rm {} \; 2.设置不产生.DS_Stor ...