<!DOCTYPE html><html><head> <title>嵌入式设备登录</title> <link rel="stylesheet" type="text/css" href="style.css"></head><body> <div class="login-box"> <img src="background.jpg" class="background"> <h1>设备登录</h1> <form> <label for="username">用户名:</label> <input type="text" id="username" name="username" required> <label for="password">密码:</label> <input type="password" id="password" name="password" required> <input type="submit" value="登录"> </form> </div></body></html>body { background-color: #f2f2f2;}.login-box { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); background-color: #fff; padding: 50px; border-radius: 10px; box-shadow: 0 0 20px 0 rgba(0,0,0,0.2);}.background { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; filter: blur(5px);}h1 { margin: 0 0 30px; padding: 0; font-size: 28px; text-align: center; color: #333; text-shadow: 2px 2px 2px rgba(0,0,0,0.2);}form { display: flex; flex-direction: column;}label { margin-bottom: 10px; font-size: 18px; color: #333; text-shadow: 2px 2px 2px rgba(0,0,0,0.2);}input[type="text"], input[type="password"] { padding: 10px; border: none; border-radius: 5px; background-color: #f2f2f2; color: #333; box-shadow: inset 0 0 5px rgba(0,0,0,0.2);}input[type="submit"] { margin-top: 20px; padding: 10px; border: none; border-radius: 5px; background-color: #f90; background-image: linear-gradient(to bottom, #f90, #f60); color: #fff; font-size: 18px; cursor: pointer; box-shadow: 0 2px 2px rgba(0,0,0,0.2);}input[type="submit"]:hover { background-image: linear-gradient(to bottom, #f60, #f90);}合并以上代码
时间: 2024-03-14 16:44:23 浏览: 76
以下是整合后的完整代码:
```html
<!DOCTYPE html>
<html>
<head>
<title>嵌入式设备登录</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="login-box">
<img src="background.jpg" class="background">
<h1>设备登录</h1>
<form>
<label for="username">用户名:</label>
<input type="text" id="username" name="username" required>
<label for="password">密码:</label>
<input type="password" id="password" name="password" required>
<input type="submit" value="登录">
</form>
</div>
</body>
</html>
<style>
body {
background-color: #f2f2f2;
}
.login-box {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
background-color: #fff;
padding: 50px;
border-radius: 10px;
box-shadow: 0 0 20px 0 rgba(0,0,0,0.2);
}
.background {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
filter: blur(5px);
}
h1 {
margin: 0 0 30px;
padding: 0;
font-size: 28px;
text-align: center;
color: #333;
text-shadow: 2px 2px 2px rgba(0,0,0,0.2);
}
form {
display: flex;
flex-direction: column;
}
label {
margin-bottom: 10px;
font-size: 18px;
color: #333;
text-shadow: 2px 2px 2px rgba(0,0,0,0.2);
}
input[type="text"],
input[type="password"] {
padding: 10px;
border: none;
border-radius: 5px;
background-color: #f2f2f2;
color: #333;
box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
}
input[type="submit"] {
margin-top: 20px;
padding: 10px;
border: none;
border-radius: 5px;
background-color: #f90;
background-image: linear-gradient(to bottom, #f90, #f60);
color: #fff;
font-size: 18px;
cursor: pointer;
box-shadow: 0 2px 2px rgba(0,0,0,0.2);
}
input[type="submit"]:hover {
background-image: linear-gradient(to bottom, #f60, #f90);
}
</style>
```
阅读全文