回答編集履歴
3
補足の追加。
answer
CHANGED
@@ -23,3 +23,38 @@
|
|
23
23
|
}
|
24
24
|
```**動くサンプル:**[https://jsfiddle.net/e1au0a51/](https://jsfiddle.net/e1au0a51/)
|
25
25
|
|
26
|
+
|
27
|
+
---
|
28
|
+
|
29
|
+
**追記:**
|
30
|
+
|
31
|
+
ginさんのおっしゃられているやり方↓
|
32
|
+
|
33
|
+
|
34
|
+
```CSS
|
35
|
+
.module_columns_three {
|
36
|
+
border-top: 1px solid #aaa;
|
37
|
+
overflow: hidden;
|
38
|
+
border-left: 1px solid #aaa; /* change */
|
39
|
+
}
|
40
|
+
|
41
|
+
.columns_three_column {
|
42
|
+
float: left;
|
43
|
+
-webkit-box-sizing: border-box;
|
44
|
+
-moz-box-sizing: border-box;
|
45
|
+
box-sizing: border-box;
|
46
|
+
width: calc(100%/3);
|
47
|
+
border-right: 1px solid #aaa; /* change */
|
48
|
+
border-bottom: 1px solid #aaa;
|
49
|
+
}
|
50
|
+
/*
|
51
|
+
.columns_three_column:nth-child(3n),
|
52
|
+
.columns_three_column:last-child {
|
53
|
+
border-right: 1px solid #aaa;
|
54
|
+
}
|
55
|
+
|
56
|
+
.columns_three_column:last-child {
|
57
|
+
margin-right: -1px;
|
58
|
+
}
|
59
|
+
*/ /* change */
|
60
|
+
```
|
2
補足の追加。
answer
CHANGED
@@ -13,8 +13,8 @@
|
|
13
13
|
border-right: 1px solid #aaa; /* change */
|
14
14
|
border-bottom: 1px solid #aaa;
|
15
15
|
}
|
16
|
-
.columns_three_column:nth-child(4n),
|
16
|
+
.columns_three_column:nth-child(4n), /* change */
|
17
|
-
.columns_three_column:first-child {
|
17
|
+
.columns_three_column:first-child { /* change */
|
18
18
|
border-left: 1px solid #aaa; /* change */
|
19
19
|
}
|
20
20
|
|
1
補足の追加。
answer
CHANGED
@@ -1,3 +1,25 @@
|
|
1
1
|
1列目は左の border で書かれていて、下の段は右の border で書かれているためです。
|
2
2
|
|
3
|
-
border の left と right を全部逆にすればずれなくなると思いますよ。
|
3
|
+
border の left と right を全部逆にすればずれなくなると思いますよ。
|
4
|
+
|
5
|
+
|
6
|
+
```CSS
|
7
|
+
.columns_three_column {
|
8
|
+
float: left;
|
9
|
+
-webkit-box-sizing: border-box;
|
10
|
+
-moz-box-sizing: border-box;
|
11
|
+
box-sizing: border-box;
|
12
|
+
width: calc(100%/3);
|
13
|
+
border-right: 1px solid #aaa; /* change */
|
14
|
+
border-bottom: 1px solid #aaa;
|
15
|
+
}
|
16
|
+
.columns_three_column:nth-child(4n),
|
17
|
+
.columns_three_column:first-child {
|
18
|
+
border-left: 1px solid #aaa; /* change */
|
19
|
+
}
|
20
|
+
|
21
|
+
.columns_three_column:last-child {
|
22
|
+
/*margin-right: -1px;*/ /* change */
|
23
|
+
}
|
24
|
+
```**動くサンプル:**[https://jsfiddle.net/e1au0a51/](https://jsfiddle.net/e1au0a51/)
|
25
|
+
|