Browse Source

fix: update login php

igb 1 month ago
parent
commit
a227b6135a
1 changed files with 75 additions and 4 deletions
  1. 75 4
      system/login.php

+ 75 - 4
system/login.php

@@ -92,18 +92,89 @@ if ($act == "login") {
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge" />
 <link href="css/loginlayout.css" type="text/css" rel="stylesheet" />
 <title><?php echo $webname; ?> - 网站后台管理</title>
 <script language="javascript" src="js/jquery-1.7.2.min.js"></script>
 <script type="text/javascript" src="js/loginjs.js"></script>
+<style type="text/css">
+/* 修复输入框变形问题 */
+#loginuser, #loginpwd, #logincode {
+    background-color: #fff;
+    border: 1px solid #ccc;
+    border-radius: 3px;
+    width: 180px;
+    height: 28px;
+    line-height: 28px;
+    padding: 0 10px;
+    outline: none; /* 防止点击时出现浏览器默认的蓝色边框 */
+    box-sizing: border-box;
+    font-size: 14px;
+}
+
+#logincode {
+    width: 100px;
+}
+
+.loginuser, .loginpwd, .logincode {
+    height: 40px;
+    margin-bottom: 8px;
+    display: flex;
+    align-items: center;
+}
+
+/* 不再使用背景图像 */
+.loginuser, .loginpwd, .logincode {
+    background: none;
+}
+
+/* 确保输入框在获取焦点时不变形 */
+#loginuser:focus, #loginpwd:focus, #logincode:focus {
+    box-shadow: 0 0 3px #226dc7;
+    border-color: #226dc7;
+}
+
+/* 调整标签样式 */
+.loginuser label, .loginpwd label, .logincode label {
+    width: 80px;
+    text-align: right;
+    margin-right: 10px;
+    font-size: 14px;
+}
+
+/* 调整验证码区域 */
+#showlogincode {
+    margin-left: 10px;
+    position: relative;
+    z-index: 1000; /* 设置高z-index值,确保显示在最顶层 */
+}
+
+/* 确保验证码图片也在最顶层 */
+#showlogincode img {
+    position: relative;
+    z-index: 1000;
+}
+
+/* 调整登录按钮位置 */
+#loginbtn {
+    background: url(../images/login_user_submit.gif) 0 0 no-repeat;
+    border: none;
+    width: 111px;
+    height: 122px;
+    text-indent: -9999px;
+    cursor: pointer;
+    position: absolute;
+    top: 120px;
+    left: 450px; /* 原来是380px,向右移动 */
+}
+</style>
 </head>
 <body>
 <div id="container">
     <form id="loginform" name="loginform" method="post">
-        <div class="loginuser"><label for="loginuser">用户帐号:</label><input type="text" id="loginuser" name="loginuser" maxlength="50" /></div>
-        <div class="loginpwd"><label for="loginpwd">用户密码:</label><input type="password" id="loginpwd" name="loginpwd" maxlength="50" /></div>
-        <div class="logincode"><label for="logincode">验 证 码:</label><input type="text" id="logincode" name="logincode" maxlength="5" /><span id="showlogincode"></span></div>
+        <div class="loginuser"><label for="loginuser">用户帐号:</label><input type="text" id="loginuser" name="loginuser" maxlength="50" autocomplete="off" /></div>
+        <div class="loginpwd"><label for="loginpwd">用户密码:</label><input type="password" id="loginpwd" name="loginpwd" maxlength="50" autocomplete="off" /></div>
+        <div class="logincode"><label for="logincode">验 证 码:</label><input type="text" id="logincode" name="logincode" maxlength="5" autocomplete="off" /><span id="showlogincode"></span></div>
         <div><input type="submit" id="loginbtn" name="loginbtn" value="登陆" /></div>
         <div id="formmsg"></div>
     </form>