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:
5050
5151# ## Examples
5252
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+ ` ` `
5783
5884# # Development
5985
Original file line number Diff line number Diff line change 1616 <float-label >
1717 <textarea placeholder =" Comment" ></textarea >
1818 </float-label >
19+
20+ <div class =" example" >
21+ <float-label >
22+ <input type =" text" placeholder =" Website" >
23+ </float-label >
24+ </div >
1925 </div >
2026 </div >
2127</template >
@@ -38,4 +44,32 @@ textarea {
3844 padding : .4em ;
3945 width : 100% ;
4046}
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+ }
4175 </style >
You can’t perform that action at this time.
0 commit comments