样式表使用类名,移除使用ID的样式

This commit is contained in:
Argo-Lenovo 2016-11-24 19:21:10 +08:00
parent f3d72f9a2d
commit f7681d02f0
5 changed files with 17 additions and 20 deletions

View File

@ -11,22 +11,22 @@
} }
@media (max-width: 768px) { @media (max-width: 768px) {
#sidebar { .sidebar {
display: none; display: none;
overflow-y: auto; overflow-y: auto;
width: 100%; width: 100%;
z-index: 5; z-index: 5;
} }
#sidebar ul li a { .sidebar ul li a {
padding-right: 25px; padding-right: 25px;
} }
#main-content { .main-content {
margin-left: 0; margin-left: 0;
} }
#main-content.open { .main-content.open {
display: none; display: none;
} }
@ -97,7 +97,7 @@
} }
@media (min-width: 768px) { @media (min-width: 768px) {
#sidebar { .sidebar {
top: 94px; top: 94px;
bottom: 40px; bottom: 40px;
position: absolute; position: absolute;
@ -106,7 +106,7 @@
} }
@media (min-height: 672px) { @media (min-height: 672px) {
#sidebar { .sidebar {
top: 94px; top: 94px;
bottom: 40px; bottom: 40px;
position: absolute; position: absolute;

View File

@ -122,34 +122,34 @@
border-color: #3c763d; border-color: #3c763d;
} }
#main-content { .main-content {
padding: 15px 15px 0 15px; padding: 15px 15px 0 15px;
margin-left: 210px; margin-left: 210px;
height: auto; height: auto;
} }
#main-content > .panel:last-child .panel-body { .main-content > .panel:last-child .panel-body {
padding-bottom: 0; padding-bottom: 0;
} }
#main-content > .panel > .panel-body > .modal-footer { .main-content > .panel > .panel-body > .modal-footer {
text-align: left; text-align: left;
} }
#main-content.closed { .main-content.closed {
margin-left: 0; margin-left: 0;
} }
#sidebar { .sidebar {
width: 210px; width: 210px;
background: #2a3542; background: #2a3542;
} }
#sidebar .sub-menu > .sub li { .sidebar .sub-menu > .sub li {
padding-left: 32px; padding-left: 32px;
} }
#sidebar ul li { .sidebar ul li {
position: relative; position: relative;
} }

View File

@ -1,7 +1,4 @@
@media (max-width: 930px) { @media (max-width: 930px) {
/*#main-content {
margin: 0px !important;
}*/
} }
@media (max-width: 666px) { @media (max-width: 666px) {
@ -47,7 +44,7 @@
z-index: 50; z-index: 50;
} }
#main-content { .main-content {
margin-top: 0; margin-top: 0;
position: fixed; position: fixed;
left: 0; left: 0;
@ -72,7 +69,7 @@
z-index: 50; z-index: 50;
} }
#main-content { .main-content {
margin-top: 0; margin-top: 0;
position: fixed; position: fixed;
left: 0; left: 0;

View File

@ -1,6 +1,6 @@
@model NavigatorBarModel @model NavigatorBarModel
<aside> <aside>
<div id="sidebar" class="nav-collapse"> <div id="sidebar" class="nav-collapse sidebar">
<!-- sidebar menu start--> <!-- sidebar menu start-->
<ul class="sidebar-menu" id="nav-accordion"> <ul class="sidebar-menu" id="nav-accordion">
@foreach (var menu in Model.Navigations) @foreach (var menu in Model.Navigations)

View File

@ -21,7 +21,7 @@
<section> <section>
@RenderSection("header", false) @RenderSection("header", false)
@RenderSection("navigator", false) @RenderSection("navigator", false)
<section id="main-content"> <section id="main-content" class="main-content">
@RenderBody() @RenderBody()
</section> </section>
@Html.Partial("Footer") @Html.Partial("Footer")