File tree Expand file tree Collapse file tree 1 file changed +43
-1
lines changed Expand file tree Collapse file tree 1 file changed +43
-1
lines changed Original file line number Diff line number Diff line change 1- # bootstrap-float-label
1+ Bootstrap Float Label
2+ =====================
3+
4+ Pure CSS implementation of Float Label pattern for Bootstrap 4 powered by [ Float Label CSS-only] ( https://github.com/tonystar/float-label-css ) .
5+
6+ <img src =" https://cdn.rawgit.com/tonystar/bootstrap-float-label/master/bootstrap-float-label.png " width =" 432 " />
7+
8+
9+ ## Usage
10+
11+ Include ` bootstrap-float-label.min.css ` :
12+ ``` html
13+ <link rel =" stylesheet" href =" https://cdn.rawgit.com/tonystar/bootstrap-float-label/v1.0.0/dist/bootstrap-float-label.min.css" />
14+ ```
15+
16+ Then just add ` .has-float-label ` class to ` .form-group ` :
17+ ``` html
18+ <span class =" form-group has-float-label" >
19+ <
input class =
" form-control" id =
" email" type =
" email" placeholder =
" [email protected] " />
20+ <label for =" email" >Email</label >
21+ </span >
22+ ```
23+
24+ ** NOTE:** ` label ` should go after ` input ` ! This is the only drawback in this method.
25+
26+ Using inside ` .input-group ` is also supported:
27+ ``` html
28+ <div class =" form-group input-group" >
29+ <span class =" has-float-label" >
30+ <input class =" form-control" id =" first" type =" text" placeholder =" Name" />
31+ <label for =" first" >First</label >
32+ </span >
33+ <span class =" has-float-label" >
34+ <input class =" form-control" id =" last" type =" text" placeholder =" Surname" />
35+ <label for =" last" >Last</label >
36+ </span >
37+ </div >
38+ ```
39+
40+
41+ ## Browser support
42+
43+ ANY browser. See [ Float Label CSS-only docs] ( https://github.com/tonystar/float-label-css#browser-support ) for more details.
You can’t perform that action at this time.
0 commit comments