rentease-web/src/styles/responsive.css

153 lines
2.4 KiB
CSS
Raw Normal View History

2026-03-05 16:42:43 +00:00
/* 全局响应式样式 */
/* 移动端隐藏类 */
.hidden-xs-only {
display: block;
}
.hidden-sm-and-up {
display: none;
}
/* 移动端适配 */
@media screen and (max-width: 768px) {
.hidden-xs-only {
display: none !important;
}
.hidden-sm-and-up {
display: block !important;
}
/* 表单适配 */
.search-form .el-form-item {
display: block;
margin-right: 0;
margin-bottom: 10px;
}
.search-form .el-form-item__content {
width: 100%;
}
.search-form .el-input,
.search-form .el-select {
width: 100%;
}
/* 表格横向滚动 */
.table-wrapper {
overflow-x: auto;
}
.el-table {
min-width: 600px;
}
/* 分页适配 */
.pagination-wrapper,
.pagination {
justify-content: center;
}
/* 卡片头部适配 */
.card-header {
flex-wrap: wrap;
gap: 10px;
}
.card-header span {
font-size: 16px;
}
/* 移动端卡片列表样式 */
.mobile-list {
display: block;
}
.mobile-card {
background: #fff;
border: 1px solid #ebeef5;
border-radius: 4px;
padding: 15px;
margin-bottom: 10px;
}
.mobile-card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
padding-bottom: 10px;
border-bottom: 1px solid #ebeef5;
}
.mobile-card-title {
font-size: 16px;
font-weight: bold;
color: #303133;
}
.mobile-card-id {
font-size: 12px;
color: #909399;
}
.mobile-card-body {
margin-bottom: 10px;
}
.mobile-card-item {
display: flex;
margin-bottom: 8px;
font-size: 14px;
}
.mobile-card-label {
color: #909399;
min-width: 70px;
flex-shrink: 0;
}
.mobile-card-value {
color: #606266;
flex: 1;
word-break: break-all;
}
.mobile-card-footer {
display: flex;
justify-content: flex-end;
gap: 10px;
padding-top: 10px;
border-top: 1px solid #ebeef5;
}
/* 对话框适配 */
.el-dialog {
width: 90% !important;
margin-top: 10vh !important;
}
.el-dialog__body {
padding: 15px;
}
}
@media screen and (min-width: 769px) {
.hidden-sm-and-up {
display: none !important;
}
}
/* 小屏幕手机适配 */
@media screen and (max-width: 375px) {
.mobile-card {
padding: 12px;
}
.mobile-card-title {
font-size: 14px;
}
}