教学系统首页登陆界面源码
时间: 2023-12-03 13:01:03 浏览: 34
以下是一个简单的教学系统首页登录界面的HTML和CSS代码示例:
HTML代码:
```html
<!DOCTYPE html>
<html>
<head>
<title>教学系统登录</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="login-box">
<h2>教学系统登录</h2>
<form>
<div class="user-box">
<input type="text" name="username" required="">
<label>用户名</label>
</div>
<div class="user-box">
<input type="password" name="password" required="">
<label>密码</label>
</div>
<input type="submit" name="" value="登录">
</form>
</div>
</body>
</html>
```
CSS代码:
```css
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background: #f2f2f2;
}
.login-box {
width: 320px;
height: 420px;
background: #fff;
color: #000;
top: 50%;
left: 50%;
position: absolute;
transform: translate(-50%,-50%);
box-shadow: 0 5px 15px rgba(0,0,0,.5);
padding: 70px 30px;
border-radius: 10px;
}
h2 {
margin: 0;
padding: 0 0 20px;
text-align: center;
font-size: 22px;
}
.login-box p {
margin: 0;
padding: 0;
font-weight: bold;
}
.login-box input {
width: 100%;
margin-bottom: 20px;
}
.login-box input[type="text"],
.login-box input[type="password"] {
border: none;
border-bottom: 1px solid #000;
background: transparent;
outline: none;
height: 40px;
color: #000;
font-size: 16px;
}
.login-box input[type="submit"] {
border: none;
outline: none;
height: 40px;
background: #000;
color: #fff;
font-size: 18px;
border-radius: 20px;
}
.login-box input[type="submit"]:hover {
cursor: pointer;
background: #ffc107;
color: #000;
}
```
在这个示例中,我们使用了一个带有两个输入框和一个提交按钮的表单来实现登录功能。使用CSS样式可以使表单界面更加美观和易于使用。请注意,此代码只是一个示例,您可以根据需要进行更改。