CSS 日常练习----login

记录日常 CSS 练习的小知识点 —— login

login

点击预览

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>登陆</title>
<style>
* {
padding: 0;
margin: 0;
}

/* 清除浮动 */
.clearfix:after {
content: "";
display: table;
clear: both;
}

html, body {
height: 100%;
}

body {
font-family: "Microsoft YaHei";
background: #EBEBEB;
font-weight: 300;
font-size: 15px;
color: #333;
overflow: hidden;
}

a {
text-decoration: none;
color: #000;
}

a:hover {
color: #F87982;
}

/*home*/
#home {
padding-top: 100px;
}

/*logint界面*/
#login {
padding: 20px 30px 30px;
width: 300px;
background: #FFF;
margin: auto;
border-radius: 3px;
box-shadow: 0 3px 3px rgba(0, 0, 0, 0.3);
}

#login h3 {
font-size: 18px;
line-height: 25px;
font-weight: 300;
letter-spacing: 3px;
margin-bottom: 20px;
color: #C8C8C8;
text-align: center;
}

#login label {
color: #C8C8C8;
display: block;
height: 35px;
padding: 0 10px;
font-size: 12px;
line-height: 35px;
background: #EBEBEB;
margin-bottom: 10px;
position: relative;
}

#login label input {
font: 13px/20px "Microsoft YaHei";
background: none;
height: 20px;
border: none;
margin: 7px 0 0 10px;
width: 245px;
outline: none;
letter-spacing: normal;
z-index: 1;
position: absolute;
right:0;
}

#login label span {
display: block;
height: 35px;
color: #F30;
width: 100px;
position: absolute;
top: 0;
left: 190px;
text-align: right;
padding: 0 10px 0 0;
z-index: 0;
display: none;
}

#login button {
font-family: "Microsoft YaHei";
cursor: pointer;
width: 300px;
height: 35px;
background: #FE4E5B;
border: none;
font-size: 14px;
line-height: 30px;
letter-spacing: 3px;
color: #FFF;
position: relative;
margin-top: 10px;
-moz-transition: all 0.2s ease-in;
-webkit-transition: all 0.2s ease-in;
-o-transition: all 0.2s ease-in;
transition: all 0.2s ease-in;
}

#login button:hover {
background: #F87982;
color: #000;
}

/*头像*/
.avator {
display: block;
margin: 0 auto 20px;
border-radius: 50%;
}
</style>
</head>
<body>
<div id="home">
<form action="" id="login">
<h3>用户登入</h3>
<img class="avator" src="avatar.png" width="96" height="96"/>
<label>邮箱/名称<input type="text" name="userName" style="width:215px;"/><span>邮箱为空</span></label>
<label>密码<input type="password" name="pass"/><span>密码为空</span></label>
<button type="button">登入</button>
</form>
</div>
</body>
</html>
0%