style: 优化 AdminLTE 样式下 nav-brand 动画效果
This commit is contained in:
parent
00503fd83b
commit
991c2c6ef9
|
@ -68,9 +68,9 @@
|
||||||
border: none !important;
|
border: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.userinfo .shadow-default, .nav [data-toggle="dropdown"], .nav [data-toggle="dropdown"]:hover {
|
.userinfo .shadow-default, .nav [data-toggle="dropdown"], .nav [data-toggle="dropdown"]:hover {
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.userinfo .dropdown-item {
|
.userinfo .dropdown-item {
|
||||||
border-bottom: solid 1px rgba(255, 255, 255, 0.4);
|
border-bottom: solid 1px rgba(255, 255, 255, 0.4);
|
||||||
|
@ -136,24 +136,19 @@ aside {
|
||||||
}
|
}
|
||||||
|
|
||||||
aside .nav-brand a {
|
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;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header .sidebar-toggle-box .fa {
|
|
||||||
font-size: 1rem;
|
|
||||||
}
|
|
||||||
aside .nav-brand img, aside:hover .nav-brand img {
|
aside .nav-brand img, aside:hover .nav-brand img {
|
||||||
width: 2.125rem;
|
width: 2.125rem;
|
||||||
height: auto;
|
height: auto;
|
||||||
border-radius: 0.42rem;
|
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 {
|
aside .nav-link span {
|
||||||
|
@ -161,17 +156,6 @@ aside {
|
||||||
white-space: nowrap;
|
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 {
|
aside .nav-link span {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
@ -181,10 +165,10 @@ aside {
|
||||||
transition: margin-left .3s linear;
|
transition: margin-left .3s linear;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-header .breadcrumb {
|
.main-header .breadcrumb {
|
||||||
margin-top: -10px;
|
margin-top: -10px;
|
||||||
padding: 8px 0;
|
padding: 8px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-header {
|
.main-header {
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -228,9 +212,9 @@ aside .nav-brand {
|
||||||
color: #eee;
|
color: #eee;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-toggle-box:hover, aside .nav-brand a:hover, .userinfo .dropdown-toggle:hover, .userinfo.show .dropdown-toggle, .nav [data-toggle="dropdown"]:hover, .sidebar .nav-link:hover, .userinfo .dropdown-item:hover, .userinfo .dropdown-item a:hover, .userinfo .dropdown-item:last-child a:hover {
|
.sidebar-toggle-box:hover, aside .nav-brand a:hover, .userinfo .dropdown-toggle:hover, .userinfo.show .dropdown-toggle, .nav [data-toggle="dropdown"]:hover, .sidebar .nav-link:hover, .userinfo .dropdown-item:hover, .userinfo .dropdown-item a:hover, .userinfo .dropdown-item:last-child a:hover {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar .nav-sidebar .has-treeview .nav-link.active {
|
.sidebar .nav-sidebar .has-treeview .nav-link.active {
|
||||||
background-color: rgba(60, 141, 188, 0.8);
|
background-color: rgba(60, 141, 188, 0.8);
|
||||||
|
@ -241,8 +225,7 @@ aside .nav-brand {
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar .nav-sidebar > .nav-item > .nav-link[aria-expanded="true"],
|
.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);
|
background-color: rgba(59, 141, 188, 0.7);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -275,7 +258,7 @@ footer {
|
||||||
background: #2c3b41;
|
background: #2c3b41;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width:768px){
|
@media (max-width:768px) {
|
||||||
body, .form-control, .dropdown-menu, .btn:not(.btn-lg):not(.btn-xs), .input-group-text, .popover-header {
|
body, .form-control, .dropdown-menu, .btn:not(.btn-lg):not(.btn-xs), .input-group-text, .popover-header {
|
||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
}
|
}
|
||||||
|
@ -285,9 +268,10 @@ footer {
|
||||||
padding: 0.375rem 1rem;
|
padding: 0.375rem 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-inline .form-group{
|
.form-inline .form-group {
|
||||||
margin-bottom:0.75rem;
|
margin-bottom: 0.75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-inline .form-group .control-label {
|
.form-inline .form-group .control-label {
|
||||||
margin-bottom: 0.125rem;
|
margin-bottom: 0.125rem;
|
||||||
}
|
}
|
||||||
|
@ -331,10 +315,6 @@ footer {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-open .header .sidebar-toggle-box span {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
aside {
|
aside {
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
|
@ -379,13 +359,24 @@ footer {
|
||||||
transition: margin-left .3s linear, opacity .3s ease, visibility .3s ease;
|
transition: margin-left .3s linear, opacity .3s ease, visibility .3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-open aside:hover {
|
.sidebar-open .header {
|
||||||
width: 13.375rem;
|
margin-left: 3.375rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-open .header .sidebar-toggle-box span {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-open aside {
|
||||||
z-index: 15;
|
z-index: 15;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-open .header {
|
.sidebar-open aside:hover {
|
||||||
margin-left: 3.375rem;
|
width: 13.375rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-open aside:hover .nav-brand img {
|
||||||
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-open aside {
|
.sidebar-open aside {
|
||||||
|
@ -399,12 +390,16 @@ footer {
|
||||||
margin-left: -10px;
|
margin-left: -10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sidebar-open aside .nav-brand img {
|
||||||
|
margin-left: 112px;
|
||||||
|
}
|
||||||
|
|
||||||
.sidebar-open aside .nav-header img {
|
.sidebar-open aside .nav-header img {
|
||||||
width: 2.25rem;
|
width: 2.25rem;
|
||||||
height: 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;
|
opacity: 1;
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
|
|
@ -310,9 +310,12 @@ body, .form-control, .dropdown-menu, .btn:not(.btn-lg):not(.btn-xs), .input-grou
|
||||||
transition: all .3s linear;
|
transition: all .3s linear;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sidebar-toggle-box, .nav-brand span {
|
||||||
|
font-size: 1.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
.sidebar-toggle-box {
|
.sidebar-toggle-box {
|
||||||
display: block;
|
display: block;
|
||||||
font-size: 1.25rem;
|
|
||||||
color: #777;
|
color: #777;
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
padding: 12px 0;
|
padding: 12px 0;
|
||||||
|
|
Loading…
Reference in New Issue