博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
jquery插件实现堆叠式菜单
阅读量:2353 次
发布时间:2019-05-10

本文共 2168 字,大约阅读时间需要 7 分钟。

每天一个jquery插件-堆叠式菜单,供大家参考,具体内容如下

堆叠式菜单

一个多页面的特效

效果如下

代码部分
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<!DOCTYPE html>
<html>
 <head>
  <meta charset="utf-8">
  <title>堆叠式菜单</title>
  <script src="js/jquery-3.4.1.min.js"></script>
  <style>
   * {
    margin: 0px;
    padding: 0px;
   }
 
   #boxs {
    position: fixed;
    top: 0px;
    bottom: 0px;
    left: 0px;
    right: 0px;
    background-color: lightgray;
   }
 
   .box {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding-top: 10px;
    padding-left: 70px;
    font-weight: bold;
    color: white;
    transition: all 0.5s linear;
   }
 
   .box1 {
    background-color: #1abc9c;
    z-index: 1;
   }
 
   .box2 {
    background-color: #2ecc71;
    z-index: 2;
   }
 
   .box3 {
    background-color: #3498db;
    z-index: 3;
   }
 
   .box4 {
    background-color: #9b59b6;
    z-index: 4;
   }
 
   .box5 {
    background-color: #34495e;
    z-index: 5;
   }
 
   .box6 {
    background-color: #f1c40f;
    z-index: 6;
   }
 
   #btn {
    color: black;
    z-index: 9;
    position: fixed;
    width: 30px;
    height: 30px;
    /* background-color:lightgray; */
    top: 5px;
    left: 10px;
    font-size: 30px;
    cursor: pointer;
    transition: all 0.3s linear;
    display: flex;
    justify-content: center;
    align-items: center;
   }
 
   #btn:hover {
    color: white;
    font-weight: bold;
   }
 
   #btn.check {
    transform: rotate(135deg);
    color: white;
    font-weight: bold;
   }
   .box.check{
    z-index: 99;
   }
   .box span{
    cursor: pointer;
   }
  </style>
 </head>
 <body>
  <div id="btn">×</div>
  <div id="boxs">
   <div class="box box1" data-index="1"><span>页面1</span></div>
   <div class="box box2" data-index="2"><span>页面2</span></div>
   <div class="box box3" data-index="3"><span>页面3</span></div>
   <div class="box box4" data-index="4"><span>页面4</span></div>
   <div class="box box5" data-index="5"><span>页面5</span></div>
   <div class="box box6" data-index="6"><span>页面6</span></div>
  </div>
 </body>
</html>

转载地址:http://mxevb.baihongyu.com/

你可能感兴趣的文章
HTTPS 免费证书,免费 ssl 证书,FreeSSL.cn 申请多种免费证书
查看>>
SSH Config 那些你所知道和不知道的事
查看>>
10 分钟理解什么是 OAuth 2.0 协议
查看>>
docker volume 容器卷的那些事(一)
查看>>
docker volume 容器卷的那些事(二)
查看>>
首日报名爆满超300 向C++大师Lippman提问征集
查看>>
如何降低白噪声对网站用户体验的影响?
查看>>
TUP Masters第七期:C++大师Lippman论编程新范式Hugo
查看>>
[TUP第30期]直击移动应用开发难点 探讨跨平台最佳解决方案
查看>>
Avangate SaaS模式开启全球软件新营销之门
查看>>
如何降低白噪声对网站用户体验的影响?
查看>>
17173总经理赵佳:媒体移动化需抓住三大要素
查看>>
七丽借百度SiteApp移动化 分发及变现能力获大幅提升
查看>>
TUP第30期:微软资深专家论如何用Visual Studio开发iOS、Android应用
查看>>
四大UX设计原则,打造网站最佳浏览体验
查看>>
Fundation 5发布:号称最快版本,响应式用户体验更完善
查看>>
TUP第31期将同步视频直播 向《浪潮之巅》吴军提问继续征集中
查看>>
TUP第31期:《浪潮之巅》吴军“start up新特点及企业发展机遇”全程图文报道
查看>>
什么是响应式Web设计?怎样进行?
查看>>
通过CSS3 Media Query实现响应式Web设计
查看>>