写一个前端页面 背景是一张图片左上角显示校园二手交易平台 右边是一个登录窗口
时间: 2024-04-01 16:36:46 浏览: 23
好的,您需要一个静态的HTML页面,内容如下:
```html
<!DOCTYPE html>
<html>
<head>
<title>校园二手交易平台</title>
<style>
body {
background-image: url("your-image-url.jpg");
background-size: cover;
}
.login-container {
width: 400px;
height: 300px;
background-color: white;
margin: 50px auto;
padding: 20px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
border-radius: 10px;
}
.login-form {
display: flex;
flex-direction: column;
}
.login-input {
margin-bottom: 10px;
padding: 10px;
border: none;
border-radius: 5px;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
font-size: 16px;
}
.login-button {
background-color: #007bff;
color: white;
padding: 10px;
border: none;
border-radius: 5px;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
font-size: 16px;
cursor: pointer;
transition: background-color 0.3s ease;
}
.login-button:hover {
background-color: #0056b3;
}
</style>
</head>
<body>
<h1 style="text-align: center; color: white;">校园二手交易平台</h1>
<div class="login-container">
<h2 style="text-align: center;">登录</h2>
<form class="login-form">
<input type="text" class="login-input" placeholder="用户名">
<input type="password" class="login-input" placeholder="密码">
<button type="submit" class="login-button">登录</button>
</form>
</div>
</body>
</html>
```
您需要将其中的 `your-image-url.jpg` 替换成您想要的背景图片的URL。然后保存为一个HTML文件,用浏览器打开即可看到页面效果。