首页 >> js开发 >> JavaScriptjs实现带箭头的进度流程
JavaScriptjs实现带箭头的进度流程
发布时间: 2021年1月13日 | 浏览:
| 分类:js开发
本文实例为大家分享了js实现带箭头进度流程的具体代码,供大家参考,具体内容如下html
.cssNav {
margin: 100px auto;
background-color: #dedede;
width:420px;
}
.cssNav li{
padding:0 20px;
line-height: 40px;
background-color: #50abe4;
display: inline-block;
color:#fff;
position: relative;
margin-right: 4px;
}
.cssNav 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;
}
.cssNav li:before{
content:"";
display: block;
border-top:20px solid transparent;
border-bottom:20px solid transparent;
border-left:20px solid #fff;
position: absolute;
left:0px;
top:0;
}
.cssNav li:first-child{
border-radius: 4px 0 0 4px;
padding-left:25px;
}
.cssNav li:last-child,.cssNavEnd{
border-radius: 0 4px 4px 0;
padding-right: 25px;
}
.cssNav li:first-child:before{
display: none;
}
.cssNav li:last-child:after,.cssNavEnd:after{
display: none;
}
.cssNav li.active {
background-color: #ef72b6;
}
.cssNav li.active:after {
border-left-color: #ef72b6;
}
.cssNav {
margin: 100px auto;
background-color: #dedede;
width:420px;
}
.cssNav li{
padding:0 20px;
line-height: 40px;
background-color: #50abe4;
display: inline-block;
color:#fff;
position: relative;
margin-right: 4px;
}
.cssNav 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;
}
.cssNav li:before{
content:"";
display: block;
border-top:20px solid transparent;
border-bottom:20px solid transparent;
border-left:20px solid #fff;
position: absolute;
left:0px;
top:0;
}
.cssNav li:first-child{
border-radius: 4px 0 0 4px;
padding-left:25px;
}
.cssNav li:last-child,.cssNavEnd{
border-radius: 0 4px 4px 0;
padding-right: 25px;
}
.cssNav li:first-child:before{
display: none;
}
.cssNav li:last-child:after,.cssNavEnd:after{
display: none;
}
.cssNav li.active {
background-color: #ef72b6;
}
.cssNav li.active:after {
border-left-color: #ef72b6;
} js
// 需要引入vue.js
new Vue({
el: '.cssNav',
data: {
num:0,
list:['首页','测试文字','新闻也','地址页']
},
methods: {
tab:function(i){
this.num = i;
}
}
})
// 需要引入vue.js
new Vue({
el: '.cssNav',
data: {
num:0,
list:['首页','测试文字','新闻也','地址页']
},
methods: {
tab:function(i){
this.num = i;
}
}
})说明:如果不用vue.js来写,只需要把样式复制就可以了以上就是本文的全部内容,希望对大家的学习有所帮助。
- {{item}}
- {{item}}
.cssNav {
margin: 100px auto;
background-color: #dedede;
width:420px;
}
.cssNav li{
padding:0 20px;
line-height: 40px;
background-color: #50abe4;
display: inline-block;
color:#fff;
position: relative;
margin-right: 4px;
}
.cssNav 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;
}
.cssNav li:before{
content:"";
display: block;
border-top:20px solid transparent;
border-bottom:20px solid transparent;
border-left:20px solid #fff;
position: absolute;
left:0px;
top:0;
}
.cssNav li:first-child{
border-radius: 4px 0 0 4px;
padding-left:25px;
}
.cssNav li:last-child,.cssNavEnd{
border-radius: 0 4px 4px 0;
padding-right: 25px;
}
.cssNav li:first-child:before{
display: none;
}
.cssNav li:last-child:after,.cssNavEnd:after{
display: none;
}
.cssNav li.active {
background-color: #ef72b6;
}
.cssNav li.active:after {
border-left-color: #ef72b6;
}
.cssNav {
margin: 100px auto;
background-color: #dedede;
width:420px;
}
.cssNav li{
padding:0 20px;
line-height: 40px;
background-color: #50abe4;
display: inline-block;
color:#fff;
position: relative;
margin-right: 4px;
}
.cssNav 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;
}
.cssNav li:before{
content:"";
display: block;
border-top:20px solid transparent;
border-bottom:20px solid transparent;
border-left:20px solid #fff;
position: absolute;
left:0px;
top:0;
}
.cssNav li:first-child{
border-radius: 4px 0 0 4px;
padding-left:25px;
}
.cssNav li:last-child,.cssNavEnd{
border-radius: 0 4px 4px 0;
padding-right: 25px;
}
.cssNav li:first-child:before{
display: none;
}
.cssNav li:last-child:after,.cssNavEnd:after{
display: none;
}
.cssNav li.active {
background-color: #ef72b6;
}
.cssNav li.active:after {
border-left-color: #ef72b6;
} js
// 需要引入vue.js
new Vue({
el: '.cssNav',
data: {
num:0,
list:['首页','测试文字','新闻也','地址页']
},
methods: {
tab:function(i){
this.num = i;
}
}
})
// 需要引入vue.js
new Vue({
el: '.cssNav',
data: {
num:0,
list:['首页','测试文字','新闻也','地址页']
},
methods: {
tab:function(i){
this.num = i;
}
}
})说明:如果不用vue.js来写,只需要把样式复制就可以了以上就是本文的全部内容,希望对大家的学习有所帮助。
相关文章:
- jsecharts 使用formatter 修改鼠标悬浮事件信息操作js大全
- jsvue中移动端调取本地的复制的文本方式js大全
- js代码JavaScript中reduce()的5个基本用法示例
- jsJS中的变量作用域(console版)js大全
- js完美解决通过IP地址访问VUE项目的问题js大全
- js在Echarts图中给坐标轴加一个标识线markLinejs大全
- js使用 Github Actions 自动部署 Angular 应用到 Github Pages的方法js大全
- jsmpvue 项目初始化及实现授权登录的实现方法js大全
- js一文读懂vue动态属性数据绑定(v-bind指令)js大全
- jsVue清除定时器setInterval优化方案分享js大全