/* 页面整体背景 */ .green-box { background-color: #4caf50; /* 绿色背景 */ padding: 10px 20px; /* 减小上下内边距,控制高度 */ text-align: center; display: flex; flex-direction: column; /* 设置垂直方向布局 */ justify-content: center; align-items: center; max-height: 100rpx; /* 限制最大高度 */ max-width: calc(100% - 10px); /* 宽度最大100%,两边各留5px */ margin-left: 15px; /* 左边留5px */ margin-right: 15px; /* 右边留5px */ box-sizing: border-box; /* 确保 padding 和 margin 不影响宽度计算 */ } .title-en { font-size: 16px; color: #fff; display: block; } /* 父容器样式 */ .container { padding: 15px; background-color: #f4f4f4; display: block; } /* 标题样式 */ .title { font-size: 22px; font-weight: bold; } .sub-title { font-size: 15px; font-weight:700; } .content { font-size: 16px; } /* 使每个段落独立 */ .content { text-indent: 2em; /* 段落首行缩进 */ }