-
Notifications
You must be signed in to change notification settings - Fork 0
/
simpleresponsive.css
108 lines (92 loc) · 1.78 KB
/
simpleresponsive.css
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
/*抄的responsive form代码,form里面大div是一对,小div是一对里面靠右的那个*/
/*页面内用viewport告诉移动设备支持按照设备实际宽渲染页面<meta name=viewport content="width=device-width, initial-scale=1.0">*/
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
body {
padding: 20px 15%;
}
form>div {
clear: both;
overflow: hidden;
padding: 1px;
margin: 0 0 10px 0;
}
form>div>fieldset>div>div {
margin: 0 0 5px 0;
}
form>div>label,
legend {
width: 25%;
float: left;
padding-right: 10px;
}
form>div>div,
form>div>fieldset>div {
width: 75%;
float: right;
}
form>div>fieldset label {
font-size: 90%;
}
fieldset {
border: 0;
padding: 0;
}
input[type=text],
input[type=email],
input[type=url],
input[type=password],
textarea {
width: 100%;
border-top: 1px solid #ccc;
border-left: 1px solid #ccc;
border-right: 1px solid #eee;
border-bottom: 1px solid #eee;
}
input[type=text],
input[type=email],
input[type=url],
input[type=password] {
width: 50%;
}
input[type=text]:focus,
input[type=email]:focus,
input[type=url]:focus,
input[type=password]:focus,
textarea:focus {
outline: 0;
border-color: #4697e4;
}
@media (max-width: 600px) {
form>div {
margin: 0 0 15px 0;
}
form>div>label,
legend {
width: 100%;
float: none;
margin: 0 0 5px 0;
}
form>div>div,
form>div>fieldset>div {
width: 100%;
float: none;
}
input[type=text],
input[type=email],
input[type=url],
input[type=password],
textarea,
select {
width: 100%;
}
}
@media (min-width: 1200px) {
form>div>label,
legend {
text-align: right;
}
}