| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- /* 基本样式 */
- body {
- font-family: Arial, sans-serif;
- margin: 0;
- padding: 0;
- background-color: #f4f4f4;
- }
- /* 表单容器 */
- .form-container {
- width: 90%;
- margin: 0 auto;
- padding: 20px;
- background-color: #ffffff;
- box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
- }
- /* 表单行,使用 flexbox 布局 */
- .form-row {
- display: flex;
- justify-content: space-between;
- /* 水平分配空间 */
- margin-bottom: 20px;
- flex-wrap: wrap;
- /* 如果窗口过小,允许换行 */
- }
- /* 每个查询条件的容器 */
- .form-group {
- display: flex;
- align-items: center;
- /* 垂直居中 */
- flex: 0 0 30%;
- /* 每个查询条件占宽度的 30%,留出空隙 */
- }
- /* 标签 */
- label {
- display: inline-block;
- width: 100px;
- /* 固定标签宽度 */
- font-weight: bold;
- text-align: right;
- margin-right: 10px;
- /* 标签与输入框之间的距离 */
- white-space: nowrap;
- /* 防止标签换行 */
- }
- /* 输入框和下拉框样式 */
- input,
- select {
- padding: 8px;
- width: 100%;
- /* 输入框宽度占满剩余空间 */
- box-sizing: border-box;
- }
- /* 提交按钮 */
- button {
- padding: 12px 20px;
- background-color: #4CAF50;
- color: white;
- border: none;
- cursor: pointer;
- width: 100%;
- font-size: 16px;
- }
- button:hover {
- background-color: #45a049;
- }
- /* 每行之间的间距 */
- .form-row+.form-row {
- margin-top: 10px;
- }
- /* 样式调整,保证响应式 */
- @media (max-width: 768px) {
- .form-group {
- flex: 0 0 100%;
- /* 在小屏幕上,每个查询条件占满整行 */
- margin-bottom: 10px;
- }
- label {
- width: 80px;
- }
- }
|