回答編集履歴

1

sample

2021/06/30 07:44

投稿

yambejp
yambejp

スコア116849

test CHANGED
@@ -1 +1,57 @@
1
1
  スタイルシートで.boxにdisplay:flexをして、.box divに40%くらいで調整してみては?
2
+
3
+
4
+
5
+ # sample
6
+
7
+ ```CSS
8
+
9
+ <style>
10
+
11
+ .box{
12
+
13
+ display:flex;
14
+
15
+ flex-wrap: wrap;
16
+
17
+ justify-content:space-between;
18
+
19
+ }
20
+
21
+ .box div{
22
+
23
+ width:40%;
24
+
25
+ }
26
+
27
+ .box div:nth-child(2n){
28
+
29
+ text-align:right;
30
+
31
+ }
32
+
33
+ </style>
34
+
35
+ <div class="box">
36
+
37
+ <div>user1</div>
38
+
39
+ <div>user2</div>
40
+
41
+ <div>user3</div>
42
+
43
+ <div>user4</div>
44
+
45
+ <div>user5</div>
46
+
47
+ <div>user6</div>
48
+
49
+ <div>user7</div>
50
+
51
+ <div>user8</div>
52
+
53
+ <div>user9</div>
54
+
55
+ </div>
56
+
57
+ ```