重构样式表,移除max-width,全部使用移动设备优先的min-width方法

This commit is contained in:
Argo-Lenovo 2017-03-26 17:56:15 +08:00
parent 77fc07f7a1
commit 00a073c7fe
5 changed files with 112 additions and 147 deletions

View File

@ -1,107 +1,26 @@
@media (min-width: 992px) {
.modal-dialog {
width: 900px;
@media (min-width: 375px) {
.hidden-375 {
display: unset;
}
.form-group .form-control-url {
width: 87%;
}
}
@media (max-width: 940px) {
.hidden-tb {
display: none;
}
}
@media (max-width: 768px) {
.form-group .form-control-url {
width: 100%;
}
.sidebar {
display: none;
overflow-y: auto;
width: 100%;
z-index: 5;
}
.sidebar ul li a {
padding-right: 25px;
}
.main-content {
margin-left: 0;
}
.main-content.open {
display: none;
}
.modal-dialog {
width: 540px;
margin: 20px auto;
}
.icon-body {
margin-right: 0 !important;
}
.modal-body div.checkbox {
min-width: 190px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.site-footer {
position: relative;
}
}
@media (max-width: 548px) {
.modal-dialog {
width: 460px;
}
}
@media (max-width: 480px) {
.modal-dialog {
width: 300px;
}
input[type="datetime"] {
min-width: inherit;
}
.bs-bars {
display: none;
}
.toolbar {
display: inline-block;
}
}
@media (max-width: 400px) {
.toolbar .dropdown-menu a {
border-left: none;
padding: 0 8px;
padding: 0 20px;
border-left: solid 1px #aeb2b7;
}
.toolbar .dropdown-menu a:first-child {
padding-left: 16px;
}
.toolbar .dropdown-menu a:last-child {
padding-right: 16px;
border-left: none;
}
}
@media (max-width: 374px) {
.hidden-400 {
@media (min-width: 568px) {
.toolbar {
display: none;
}
.bs-bars {
display: inline-block;
}
}
@media (min-width: 768px) {
@ -111,21 +30,34 @@
position: absolute;
overflow-y: auto;
}
}
@media (min-height: 672px) {
.sidebar {
top: 94px;
bottom: 40px;
position: absolute;
overflow-y: auto;
.modal-dialog {
width: unset;
}
.site-footer {
position: fixed;
left: 0;
bottom: 0;
right: 0;
.form-group .form-control-url {
width: 85%;
}
}
@media (min-width: 769px) {
.sidebar {
display: unset;
width: 210px;
}
.main-content {
margin-left: 210px;
}
.main-content.open {
display: unset;
}
}
@media (min-width: 940px) {
.hidden-tb {
display: unset;
}
}
@ -140,6 +72,15 @@
}
}
@media (min-height: 672px) {
.sidebar {
top: 94px;
bottom: 40px;
position: absolute;
overflow-y: auto;
}
}
@media (max-height: 568px) {
.modal-body {
height: 300px;

View File

@ -30,6 +30,10 @@
font-weight: 600;
}
.hidden-tb, .hidden-375 {
display: none;
}
.clearcache {
position: absolute;
right: 60px;
@ -61,10 +65,6 @@
vertical-align: middle;
}
.form-group .form-control-url {
width: 83%;
}
.modal-dialog .modal-body, .panel-body {
padding-bottom: 0;
}
@ -81,6 +81,11 @@
margin-left: 4px;
}
.modal.in .modal-dialog {
padding: 0 15px;
max-width: 1000px;
}
.modal-header {
background-color: #f5f5f5;
border-top-left-radius: 6px;
@ -92,6 +97,13 @@
margin-top: 1px;
}
.modal-body .checkbox {
min-width: 190px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.modal-footer {
clear: both;
}
@ -123,10 +135,22 @@
.main-content {
padding: 15px 15px 0 15px;
margin-left: 210px;
margin-left: 0;
height: auto;
left: 0;
bottom: 40px;
right: 0;
top: 94px;
}
.main-content.open {
display: none;
}
.main-content.closed {
margin-left: 0;
}
.main-content > .panel:last-child .panel-body {
padding-bottom: 0;
}
@ -135,15 +159,18 @@
text-align: left;
}
.main-content.closed {
margin-left: 0;
}
.sidebar {
width: 210px;
display: none;
overflow-y: auto;
width: 100%;
z-index: 5;
background: #2a3542;
}
.sidebar ul li a {
padding-right: 25px;
}
.sidebar .sub-menu > .sub li {
padding-left: 32px;
}
@ -266,12 +293,15 @@ ul.sidebar-menu {
margin-top: 16px;
}
.bs-bars {
display: none;
}
.toolbar {
position: relative;
margin-top: 10px;
margin-bottom: 10px;
line-height: 34px;
display: none;
}
.toolbar .dropdown-menu {
@ -280,14 +310,18 @@ ul.sidebar-menu {
}
.toolbar .dropdown-menu a {
padding: 0 20px;
border-left: solid 1px #aeb2b7;
border-left: none;
padding: 0 8px;
display: table-cell;
color: #504d4d;
}
.toolbar .dropdown-menu a:first-child {
border-left: none;
padding-left: 16px;
}
.toolbar .dropdown-menu a:last-child {
padding-right: 16px;
}
.toolbar .dropdown-menu a:hover {

View File

@ -1,31 +1,27 @@
@media (min-width: 375px) {
.sidebar-toggle-box span {
display: inline-block;
}
}
@media (min-width: 568px) {
.notify-row {
display: inline-block;
}
}
@media (min-width: 736px) {
.sidebar-toggle-box span {
display: unset;
}
}
@media (min-width: 768px) {
.header {
html, body {
height: 100%;
overflow: hidden;
}
.header, .site-footer {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 50;
}
.main-content {
margin-top: 0;
position: fixed;
left: 0;
bottom: 40px;
right: 0;
top: 94px;
overflow: auto;
}
@ -40,21 +36,12 @@
overflow: hidden;
}
.header {
.header, .site-footer {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 50;
}
.main-content {
margin-top: 0;
position: fixed;
left: 0;
bottom: 40px;
right: 0;
top: 94px;
overflow: auto;
}
}

View File

@ -35,6 +35,10 @@ a, a:hover, a:focus {
height: 94px;
background: #fff;
border-bottom: 1px solid #f1f2f7;
top: 0;
left: 0;
right: 0;
z-index: 50;
}
.header a {
@ -157,7 +161,6 @@ a, a:hover, a:focus {
color: #fff;
padding: 10px 4px;
height: 40px;
position: fixed;
left: 0;
bottom: 0;
right: 0;

View File

@ -1,5 +1,5 @@
$(function () {
$('#panelResultHeader').html('查询结果<span class="hidden-400 text-danger">(仅 Administrators 角色成员可删除数据)<span>');
$('#panelResultHeader').html('查询结果<span class="hidden-375 text-danger">(仅 Administrators 角色成员可删除数据)<span>');
var bsa = new BootstrapAdmin({
url: Dicts.url,
dataEntity: new DataEntity({