<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>登录界面</title> <style> body { margin: 0; padding: 0; background-color: #f2f2f2; font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; } #page_login { display: flex; justify-content: center; align-items: center; height: 100vh; } .loginContainer { display: flex; flex-direction: column; align-items: center; justify-content: center; background-color: white; border-radius: 5px; box-shadow: 0px 0px 10px rgba(0,0,0,0.2); padding: 30px; } .loginContainer > div { font-size: 36px; margin-bottom: 20px; text-align: center; } input[type="text"], input[type="password"] { width: 100%; padding: 10px; margin-bottom: 10px; border: none; border-radius: 5px; box-shadow: 0px 0px 5px rgba(0,0,0,0.1); } #loginButton { background-color: #007bff; color: white; padding: 10px 20px; border: none; border-radius: 5px; box-shadow: 0px 0px 5px rgba(0,0,0,0.1); transition: all 0.2s ease-in-out; } #loginButton:hover { transform: scale(1.05); box-shadow: 0px 0px 10px rgba(0,0,0,0.2); } </style> </head> <body> <!-- 登录界面 --> <div id="page_login"> <div class="loginContainer"> <div>Login</div> <input type="text" name="account" id="account" placeholder="account"> <input type="password" name="password" id="password" placeholder="password"> <button id="loginButton" onclick="getLogin()">login</button> </div> <button id="checkinto">select</button> </div> </body> <script> document.getElementById('checkinto').addEventListener('click', function() { window.location.href = 'select.html'; }); </script> <script type="text/javascript" src="./js/index.js"></script> <script src="./js/jquery-3.3.1.js"></script> </html>美化这段代码
时间: 2024-02-29 15:54:57 浏览: 92
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>登录界面</title>
<style>
body {
margin: 0;
padding: 0;
background-color: #f2f2f2;
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}
#page_login {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.loginContainer {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: white;
border-radius: 5px;
box-shadow: 0px 0px 10px rgba(0,0,0,0.2);
padding: 30px;
}
.loginContainer > div {
font-size: 36px;
margin-bottom: 20px;
text-align: center;
}
input[type="text"], input[type="password"] {
width: 100%;
padding: 10px;
margin-bottom: 10px;
border: none;
border-radius: 5px;
box-shadow: 0px 0px 5px rgba(0,0,0,0.1);
}
#loginButton {
background-color: #007bff;
color: white;
padding: 10px 20px;
border: none;
border-radius: 5px;
box-shadow: 0px 0px 5px rgba(0,0,0,0.1);
transition: all 0.2s ease-in-out;
}
#loginButton:hover {
transform: scale(1.05);
box-shadow: 0px 0px 10px rgba(0,0,0,0.2);
}
</style>
</head>
<body>
<!-- 登录界面 -->
<div id="page_login">
<div class="loginContainer">
<div>Login</div>
<input type="text" name="account" id="account" placeholder="账号">
<input type="password" name="password" id="password" placeholder="密码">
<button id="loginButton" onclick="getLogin()">登录</button>
</div>
<button id="checkinto">选择</button>
</div>
</body>
<script>
document.getElementById('checkinto').addEventListener('click', function() {
window.location.href = 'select.html';
});
</script>
<script type="text/javascript" src="./js/index.js"></script>
<script src="./js/jquery-3.3.1.js"></script>
</html>
阅读全文