设计登录表单的样式
在这一步中,你将为登录表单设置样式。
- 将以下 CSS 代码添加到
css/style.css 文件中:
.content > img {
width: 200px;
height: 200px;
border-radius: 50%;
margin-left: 125px;
margin-top: -100px;
}
.content-container {
margin: 100px auto;
width: 450px;
height: 600px;
background-color: rgb(0, 0, 0, 0.45);
border-radius: 10px;
}
.form {
text-align: center;
}
.form > h2 {
font-size: 45px;
font-weight: 800;
margin-bottom: 20px;
}
button {
width: 80px;
height: 30px;
border: #041c32;
background-color: #2d4263;
font-size: 16px;
color: white;
margin: 10px;
}
input {
font-size: 20px;
border-radius: 5px;
width: 300px;
margin: 10px;
}
.text {
text-align: center;
margin: 10px;
}
.text > a {
text-decoration: none;
color: white;
}
这段代码为登录表单设置了样式,包括头像图片、表单容器、表单元素(标题、按钮和输入字段)以及表单底部的文本。