写一个古风的html加css加js的登录页面
时间: 2024-06-10 11:09:02 浏览: 16
好的,我可以为您提供一个古风的HTML、CSS和JS登录页面。请注意,这只是一个简单的示例,您可以根据自己的需求进行修改和定制。
HTML代码:
```
<!DOCTYPE html>
<html>
<head>
<title>古风登录页面</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="container">
<div class="title">欢迎来到古风世界</div>
<form class="login-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>
<button type="submit">登录</button>
</form>
</div>
<script src="script.js"></script>
</body>
</html>
```
CSS代码:
```
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Microsoft YaHei', sans-serif;
background-color: #F9E4C9;
}
.container {
width: 400px;
margin: 100px auto;
background-color: #FFFFFF;
border-radius: 10px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
padding: 40px;
}
.title {
font-size: 24px;
font-weight: bold;
color: #333333;
text-align: center;
margin-bottom: 20px;
}
.login-form label {
display: block;
font-size: 18px;
color: #333333;
margin-bottom: 10px;
}
.login-form input {
display: block;
width: 100%;
padding: 10px;
border: none;
border-radius: 5px;
margin-bottom: 20px;
background-color: #F5F5F5;
color: #333333;
font-size: 16px;
}
.login-form button {
display: block;
width: 100%;
padding: 10px;
border: none;
border-radius: 5px;
background-color: #FFB347;
color: #FFFFFF;
font-size: 18px;
font-weight: bold;
cursor: pointer;
}
.login-form button:hover {
background-color: #FFA133;
}
```
JS代码:
```
// 这里可以添加一些JS效果,比如输入框获得焦点时改变颜色等等
```