表单向导 css实现 步骤指引器
扒的 jquery-smartwizard 箭头指引器,库很强大,但是只是想用它的箭头指引图,效果如下:代码如下:Html:<div class="sw sw-theme-arrows sw-justified"><ul class="nav"><li class="nav-item">...
·
扒的 jquery-smartwizard 箭头指引器,库很强大,但是只是想用它的箭头指引图,效果如下:
代码如下:
Html:
<div class="sw sw-theme-arrows sw-justified">
<ul class="nav">
<li class="nav-item">
<a class="nav-link inactive active"> 1 身份选择 </a>
</li>
<li class="nav-item">
<a class="nav-link inactive active"> 2 身份认证 </a>
</li>
<li class="nav-item">
<a class="nav-link inactive " > 3 选择病历 </a>
</li>
<li class="nav-item">
<a class="nav-link inactive " > 4 选择打印套餐 </a>
</li>
<li class="nav-item">
<a class="nav-link inactive "> 5 付款 </a>
</li>
<li class="nav-item">
<a class="nav-link inactive"> 6 打印 </a>
</li>
</ul>
</div>
CSS:
.sw {
position: relative;
margin-top: 20px;
}
.sw *, .sw ::after, .sw ::before {
box-sizing: border-box;
}
.sw > .nav {
display: flex;
flex-wrap: wrap;
list-style: none;
padding-left: 0;
margin-top: 0;
margin-bottom: 0;
}
@media screen and (max-width: 640px) {
.sw > .nav {
flex-direction: column !important;
flex: 1 auto
}
}
.sw > .nav .nav-link {
display: block;
padding: .5rem 1rem;
text-decoration: none;
}
.sw > .nav .nav-link:active, .sw > .nav .nav-link:focus, .sw > .nav .nav-link:hover {
text-decoration: none
}
.sw > .nav .nav-link::-moz-focus-inner {
border: 0 !important
}
.sw.sw-justified > .nav .nav-link, .sw.sw-justified > .nav > li {
flex-basis: 0;
flex-grow: 1;
text-align: center;
}
@-webkit-keyframes spin {
0% {
transform: rotate(0)
}
100% {
transform: rotate(360deg)
}
}
@keyframes spin {
0% {
transform: rotate(0)
}
100% {
transform: rotate(360deg)
}
}
.sw-theme-default .toolbar > .btn {
color: #fff;
background-color: #17a2b8;
border: 1px solid #17a2b8;
padding: .375rem .75rem;
border-radius: .25rem;
font-weight: 400
}
.sw-theme-default > .nav {
box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .1) !important
}
.sw-theme-default > .nav .nav-link {
position: relative;
height: 100%;
min-height: 100%
}
.sw-theme-default > .nav .nav-link::after {
content: "";
position: absolute;
height: 2px;
width: 0;
left: 0;
bottom: -1px;
background: #999;
transition: all .35s ease .15s
}
.sw-theme-default > .nav .nav-link.inactive {
color: #999;
cursor: not-allowed
}
.sw-theme-default > .nav .nav-link.active {
color: #17a2b8 !important;
cursor: pointer
}
.sw-theme-default > .nav .nav-link.active::after {
background: #17a2b8 !important;
width: 100%
}
.sw-theme-arrows .toolbar > .btn {
color: #fff;
background-color: #17a2b8;
border: 1px solid #17a2b8;
padding: .375rem .75rem;
border-radius: .25rem;
font-weight: 400
}
.sw-theme-arrows > .nav {
overflow: hidden;
border-bottom: 1px solid #eee
}
.sw-theme-arrows > .nav .nav-link {
position: relative;
height: 100%;
min-height: 100%;
margin-right: 30px;
margin-left: -30px;
padding-left: 40px;
}
@media screen and (max-width: 640px) {
.sw-theme-arrows > .nav .nav-link {
overflow: hidden;
margin-bottom: 1px;
margin-right: unset
}
}
.sw-theme-arrows > .nav .nav-link::after {
content: "";
position: absolute;
display: block;
width: 0;
height: 0;
top: 50%;
left: 100%;
margin-top: -50px;
border-top: 50px solid transparent;
border-bottom: 50px solid transparent;
border-left: 30px solid #f8f8f8;
z-index: 2;
}
.sw-theme-arrows > .nav .nav-link::before {
content: " ";
position: absolute;
display: block;
width: 0;
height: 0;
top: 50%;
left: 100%;
margin-top: -50px;
margin-left: 1px;
border-top: 50px solid transparent;
border-bottom: 50px solid transparent;
border-left: 30px solid #eee;
z-index: 1;
}
.sw-theme-arrows > .nav .nav-link.inactive {
color: #999;
border-color: #f8f8f8;
background: #f8f8f8;
cursor: not-allowed
}
.sw-theme-arrows > .nav .nav-link.active {
color: #fff;
border-color: #5bc0de;
background: #5bc0de;
cursor: pointer;
}
.sw-theme-arrows > .nav .nav-link.active::after {
border-left-color: #5bc0de;
}
.sw-theme-arrows.sw-dark > .nav {
border-bottom: 1px solid #555
}
.sw-theme-arrows.sw-dark > .nav .nav-link::after {
border-left: 30px solid #5f5f5f
}
.sw-theme-arrows.sw-dark > .nav .nav-link::before {
border-left: 30px solid #555
}
.sw-theme-arrows.sw-dark > .nav .nav-link.inactive {
color: #fff;
border-color: #5f5f5f;
background: #5f5f5f
}
.sw-theme-arrows.sw-dark > .nav .nav-link.inactive::after {
border-left-color: #5f5f5f
}
.sw-theme-arrows.sw-dark > .nav .nav-link.active {
color: #fff;
border-color: #010506;
background: #0a2730
}
.sw-theme-arrows.sw-dark > .nav .nav-link.active::after {
border-left-color: #0a2730
}
.sw-theme-dots .toolbar > .btn {
color: #fff;
background-color: #17a2b8;
border: 1px solid #17a2b8;
padding: .375rem .75rem;
border-radius: .25rem;
font-weight: 400
}
.sw-theme-dots > .nav {
position: relative;
margin-bottom: 10px
}
.sw-theme-dots > .nav::before {
content: " ";
position: absolute;
top: 18px;
left: 0;
width: 100%;
height: 5px;
background-color: #eee;
border-radius: 3px;
z-index: 1
}
.sw-theme-dots > .nav .nav-link {
position: relative;
margin-top: 40px
}
.sw-theme-dots > .nav .nav-link::before {
content: " ";
position: absolute;
display: block;
top: -36px;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
width: 32px;
height: 32px;
border-radius: 50%;
border: none;
background: #f5f5f5;
color: #428bca;
text-decoration: none;
z-index: 98
}
.sw-theme-dots > .nav .nav-link::after {
content: " ";
position: absolute;
display: block;
top: -28px;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
width: 16px;
height: 16px;
border-radius: 50%;
z-index: 99
}
.sw-theme-dots > .nav .nav-link.inactive {
color: #999;
cursor: not-allowed
}
.sw-theme-dots > .nav .nav-link.inactive::after {
background-color: #999
}
.sw-theme-dots > .nav .nav-link.active {
color: #5bc0de !important;
cursor: pointer
}
.sw-theme-dots > .nav .nav-link.active::after {
background-color: #5bc0de !important
}
.sw-theme-dots.sw-dark > .nav::before {
background-color: #3c3c3c
}
.sw-theme-dots.sw-dark > .nav .nav-link::before {
background: #434343;
color: #000
}
.sw-theme-progress .toolbar > .btn {
color: #fff;
background-color: #17a2b8;
border: 1px solid #17a2b8;
padding: .375rem .75rem;
border-radius: .25rem;
font-weight: 400
}
.sw-theme-progress > .nav {
box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .1) !important
}
.sw-theme-progress > .nav .nav-link {
position: relative;
height: 100%;
min-height: 100%;
background: 0 0;
overflow: hidden;
z-index: 2
}
.sw-theme-progress > .nav .nav-link::after {
content: "";
position: absolute;
height: 150%;
width: 0;
left: 0;
top: 0;
background: #fff;
z-index: -1;
transition: all .35s ease .1s
}
.sw-theme-progress > .nav .nav-link.inactive {
color: #999;
cursor: not-allowed
}
.sw-theme-progress > .nav .nav-link.active {
color: #fff !important;
cursor: pointer
}
.sw-theme-progress > .nav .nav-link.active::after {
background-color: #5cb85c;
width: 100%
}
.sw-theme-progress.sw-dark > .nav .nav-link.active {
color: #fff
}
.sw-theme-progress.sw-dark > .nav .nav-link.active::after {
background-color: #333
}
更多推荐
已为社区贡献4条内容
所有评论(0)