style: 优化 AdminLTE 样式下 nav-brand 动画效果

This commit is contained in:
Argo Zhang 2019-08-22 13:13:29 +08:00
parent 00503fd83b
commit 991c2c6ef9
No known key found for this signature in database
GPG Key ID: 152E398953DDF19F
2 changed files with 82 additions and 84 deletions

View File

@ -136,24 +136,19 @@ aside {
}
aside .nav-brand a {
display: flex;
justify-content: center;
align-items: center;
}
aside .nav-brand span, .header .sidebar-toggle-box {
font-size: 1.25rem;
white-space: nowrap;
}
.header .sidebar-toggle-box .fa {
font-size: 1rem;
}
aside .nav-brand img, aside:hover .nav-brand img {
width: 2.125rem;
height: auto;
border-radius: 0.42rem;
margin-right: 0.25rem;
}
aside .nav-brand span {
line-height: 2.125rem;
vertical-align: middle;
margin-left: 6px;
}
aside .nav-link span {
@ -161,17 +156,6 @@ aside {
white-space: nowrap;
}
.sidebar-open aside .nav-brand img, .sidebar-open aside:hover .nav-brand img {
opacity: 0;
visibility: hidden;
width: 2.125rem;
height: auto;
border-radius: 0.42rem;
position: absolute;
top: 11px;
left: 9px;
}
aside .nav-link span {
display: inline-block;
white-space: nowrap;
@ -241,8 +225,7 @@ aside .nav-brand {
}
.sidebar .nav-sidebar > .nav-item > .nav-link[aria-expanded="true"],
.sidebar .nav-sidebar .nav-item:not(.parent) .nav-link.active:before
{
.sidebar .nav-sidebar .nav-item:not(.parent) .nav-link.active:before {
background-color: rgba(59, 141, 188, 0.7);
}
@ -288,6 +271,7 @@ footer {
.form-inline .form-group {
margin-bottom: 0.75rem;
}
.form-inline .form-group .control-label {
margin-bottom: 0.125rem;
}
@ -331,10 +315,6 @@ footer {
display: none;
}
.sidebar-open .header .sidebar-toggle-box span {
opacity: 1;
}
aside {
top: 0;
}
@ -379,13 +359,24 @@ footer {
transition: margin-left .3s linear, opacity .3s ease, visibility .3s ease;
}
.sidebar-open aside:hover {
width: 13.375rem;
.sidebar-open .header {
margin-left: 3.375rem;
}
.sidebar-open .header .sidebar-toggle-box span {
opacity: 1;
}
.sidebar-open aside {
z-index: 15;
}
.sidebar-open .header {
margin-left: 3.375rem;
.sidebar-open aside:hover {
width: 13.375rem;
}
.sidebar-open aside:hover .nav-brand img {
margin-left: 0;
}
.sidebar-open aside {
@ -399,12 +390,16 @@ footer {
margin-left: -10px;
}
.sidebar-open aside .nav-brand img {
margin-left: 112px;
}
.sidebar-open aside .nav-header img {
width: 2.25rem;
height: 2.25rem;
}
.sidebar-open aside .nav-brand img, .sidebar-open aside:hover .nav-brand span, .sidebar-open aside:hover .nav-header span, .sidebar-open aside:hover .nav-item span {
.sidebar-open aside:hover .nav-brand span, .sidebar-open aside:hover .nav-header span, .sidebar-open aside:hover .nav-item span {
opacity: 1;
visibility: visible;
}

View File

@ -310,9 +310,12 @@ body, .form-control, .dropdown-menu, .btn:not(.btn-lg):not(.btn-xs), .input-grou
transition: all .3s linear;
}
.sidebar-toggle-box, .nav-brand span {
font-size: 1.25rem;
}
.sidebar-toggle-box {
display: block;
font-size: 1.25rem;
color: #777;
flex: 1 1 auto;
padding: 12px 0;