/* 基本样式重置 */ body, html { margin: 0; padding: 0; font-family: Arial, sans-serif; /* 设置页面的默认字体 */ background-color:#f4f4f4; } /* 禁用页面滚动样式 */ body.no-scroll { overflow: hidden; /* 禁止页面滚动 */ } /* 主内容区 */ .main-content { margin-left: 270px; margin-right: 20px; margin-top: 14px; /* 增加主内容区的上边距 */ padding: 20px; display: flex; flex-direction: column; justify-content: space-between; z-index: 1; /* 确保内容在侧边栏下方 */ position: relative; /* 确保相对定位 */ } .content { flex: 3 1 600px; /* 允许内容区域在可用空间内缩放 */ }