-
Notifications
You must be signed in to change notification settings - Fork 28
/
index.html
113 lines (104 loc) · 2.48 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Float Label</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"/>
<link rel="stylesheet" href="dist/float-label.css"/>
<style>
* {
box-sizing: border-box;
}
body {
position: relative;
max-width: 20rem;
background: #eee;
margin: 2rem auto;
}
fieldset {
padding: 1.5rem;
background: white;
}
input, select {
width: 100%;
margin-bottom: .5rem;
}
button {
background: #333;
color: white;
border: 0;
padding: .5em 1em;
margin-top: 1rem;
}
a {
display: block;
padding: 10px;
position: absolute;
z-index: -1;
top: 1rem;
left: 100%;
margin-left: -65px;
transition: all .2s;
}
a:hover {
margin-left: 0;
}
.input-group {
display: table;
width: 100%;
}
.input-group > * {
display: table-cell;
width: 50%;
}
</style>
</head>
<body>
<fieldset>
<legend>Sign up</legend>
<div class="input-group">
<div class="has-float-label">
<input id="first" type="text" placeholder="Name"/>
<label for="first">First</label>
</div>
<div class="has-float-label">
<input id="last" type="text" placeholder="Surname"/>
<label for="last">Last</label>
</div>
</div>
<label class="has-float-label">
<input type="email" placeholder="[email protected]"/>
<span>Email</span>
</label>
<label class="has-float-label">
<input type="password" placeholder="••••••••"/>
<span>Password</span>
</label>
<div class="input-group">
<label class="has-float-label">
<select>
<option>United States</option>
<option>Canada</option>
</select>
<span>Country</span>
</label>
<div class="has-float-label">
<select id="state">
<option>New York</option>
<option>Texas</option>
</select>
<label for="state">State</label>
</div>
</div>
<label class="has-float-label">
<textarea placeholder="No newsletter please!"></textarea>
<span>Notes</span>
</label>
<button>Sign up</button>
</fieldset>
<!---->
<a href="https://github.com/tonystar/float-label-css" target="_blank">
<img src="https://img.shields.io/github/stars/tonystar/float-label-css.svg?style=social&label=Star"/>
</a>
</body>
</html>