one-border.css
1.29 KB
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
.border-1px {
position: relative;
}
.border-1px:before,
.border-1px:after {
border-top: 1px solid #e2e2e2;
content: '';
display: block;
width: 100%;
position: absolute;
left: 0;
}
.border-1px:before {
top: 0;
}
.border-1px:after {
bottom: 0;
}
.border-1px.border-top:after {
display: none;
}
.border-1px.border-bottom:before {
display: none;
}
.border-1px-full {
position: relative;
}
.border-1px-full:after {
content: '';
position: absolute;
top: 0;
left: 0;
z-index: 1;
border: 1px solid #e2e2e2;
-webkit-box-sizing: border-box;
box-sizing: border-box;
width: 200%;
height: 200%;
-webkit-transform: scale(0.5);
transform: scale(0.5);
-webkit-transform-origin: left top;
transform-origin: left top;
border-radius: 3px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
}
@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5) {
.border-1px::after,
.border-1px::before {
-webkit-transform: scaleY(0.7);
-webkit-transform-origin: 0 0;
transform: scaleY(0.7);
}
.border-1px::after {
-webkit-transform-origin: left bottom;
}
}
@media (-webkit-min-device-pixel-ratio: 2), (min-device-pixel-ratio: 2) {
.border-1px::after,
.border-1px::before {
-webkit-transform: scaleY(0.5);
transform: scaleY(0.5);
}
}