svf
Version:
A simple validate form and React-based implementation
68 lines (59 loc) • 1.17 kB
CSS
.input-wrapper {
position: relative;
display: inline-block;
width: 100%;
}
.input {
position: relative;
display: inline-block;
padding: 4px 7px;
width: 100%;
height: 28px;
cursor: text;
font-size: 12px;
line-height: 1.5;
color: rgba(0, 0, 0, .65);
background-color: #fff;
background-image: none;
border: 1px solid #d9d9d9;
border-radius: 4px;
-webkit-transition: all .3s;
transition: all .3s;
}
.input-lg {
padding: 6px 7px;
height: 32px;
}
.error > .input {
border-color: #f04134;
}
.explain {
color: #f04134;
line-height: 1.5;
}
.label {
text-align: right;
vertical-align: middle;
line-height: 39.9999px;
display: inline-block;
overflow: hidden;
white-space: nowrap;
}
.label label {
color: rgba(0, 0, 0, .85);
}
.label label:after {
content: ":";
margin: 0 8px 0 2px;
position: relative;
top: -.5px;
}
.required:before {
display: inline-block;
margin-right: 4px;
content: "*";
font-family: SimSun;
line-height: 1;
font-size: 14px;
color: #f5222d;
}