body { font-family: Arial, sans-serif; margin: 0; padding: 0; display: flex; flex-direction: column; min-height: 100vh; } header { display: flex; justify-content: space-between; align-items: center; background-color: rgba(28, 108, 178, 0.9); color: white; padding: 20px; width: 100%; position: fixed; top: 0; z-index: 1000; } .header-content { display: flex; align-items: center; justify-content: space-between; width: 90%; margin: 0 auto; position: relative; } .header-content .btn-back { padding: 10px 20px; background-color: #1c6cb2; color: white; border: none; border-radius: 5px; text-decoration: none; } .header-content .btn-back:hover { background-color: #155a8c; } .header-content h1 { position: absolute; left: 50%; transform: translateX(-50%); } .header-content .header-spacer { width: 100px; /* 占位符,确保标题居中 */ } main { flex: 1; width: 80%; margin: 20px auto; padding-top: 80px; /* 给主内容增加顶部填充,以避免被固定导航栏遮挡 */ } .content { background-color: rgba(255, 255, 255, 0.9); padding: 30px; border-radius: 10px; text-align: center; width: 400px; position: relative; margin: auto; } h2 { color: #1c6cb2; } form { margin-top: 20px; } .tab { display: flex; justify-content: space-around; margin-bottom: 20px; } .tab button { background-color: #f1f1f1; border: none; outline: none; cursor: pointer; padding: 10px 20px; transition: 0.3s; font-size: 17px; border-radius: 5px; } .tab button:hover { background-color: #ddd; } .tab button.active { background-color: #1c6cb2; color: white; } .tabcontent { display: none; } .form-group { margin-bottom: 15px; text-align: left; } .form-group div { margin-bottom: 5px; font-weight: bold; } .form-group input { width: 100%; padding: 10px; box-sizing: border-box; } button[type="submit"] { padding: 10px 20px; background-color: #1c6cb2; color: white; border: none; border-radius: 5px; cursor: pointer; width: 100%; font-size: 16px; } button[type="submit"]:hover { background-color: #155a8c; } footer { background-color: rgba(28, 108, 178, 0.9); color: white; text-align: center; padding: 10px 0; width: 100%; position: relative; margin-top: auto; /* 将footer推到页面底部 */ }