This repository was archived by the owner on Apr 25, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +64
-4
lines changed Expand file tree Collapse file tree 3 files changed +64
-4
lines changed Original file line number Diff line number Diff line change @@ -50,10 +50,36 @@ Wrap text/email/password input or textarea:
50
50
51
51
# ## Examples
52
52
53
- Adjust ` .vfl-label` , ` .vfl-label-on-input` and ` .vfl-label-on-focus` to meet
54
- your design requirements:
55
-
56
- TODO
53
+ Style ` .vfl-label` , ` .vfl-label-on-input` and ` .vfl-label-on-focus`
54
+ to meet your design requirements:
55
+
56
+ ! [example](https://github.com/bkzl/vue-float-label/blob/master/demo/example.gif)
57
+
58
+ ` ` ` css
59
+ .vfl-label {
60
+ text-transform: uppercase;
61
+ }
62
+
63
+ .vfl-label-on-input {
64
+ top: -1em;
65
+ }
66
+
67
+ .vfl-label-on-focus {
68
+ color: # ff851b;
69
+ }
70
+
71
+ .vfl-label + input {
72
+ padding-left: 0;
73
+ font-size: 100%;
74
+ border: 0;
75
+ border-bottom: 2px solid # aaa;
76
+ transition: border 0.2s;
77
+ }
78
+
79
+ .vfl-label-on-focus + input {
80
+ border-bottom: 2px solid # ff851b;
81
+ }
82
+ ` ` `
57
83
58
84
# # Development
59
85
Original file line number Diff line number Diff line change 16
16
<float-label >
17
17
<textarea placeholder =" Comment" ></textarea >
18
18
</float-label >
19
+
20
+ <div class =" example" >
21
+ <float-label >
22
+ <input type =" text" placeholder =" Website" >
23
+ </float-label >
24
+ </div >
19
25
</div >
20
26
</div >
21
27
</template >
@@ -38,4 +44,32 @@ textarea {
38
44
padding : .4em ;
39
45
width : 100% ;
40
46
}
47
+
48
+ .example {
49
+ margin-top : 2em ;
50
+ }
51
+
52
+ .example .vfl-label {
53
+ text-transform : uppercase ;
54
+ }
55
+
56
+ .example .vfl-label-on-input {
57
+ top : -1em ;
58
+ }
59
+
60
+ .example .vfl-label-on-focus {
61
+ color : #ff851b ;
62
+ }
63
+
64
+ .example .vfl-label + input {
65
+ padding-left : 0 ;
66
+ font-size : 100% ;
67
+ border : 0 ;
68
+ border-bottom : 2px solid #aaa ;
69
+ transition : border 0.2s ;
70
+ }
71
+
72
+ .example .vfl-label-on-focus + input {
73
+ border-bottom : 2px solid #ff851b ;
74
+ }
41
75
</style >
You can’t perform that action at this time.
0 commit comments