回答編集履歴
4
サンプルリンク追加
answer
CHANGED
@@ -114,5 +114,6 @@
|
|
114
114
|
border-radius: 10px;
|
115
115
|
}
|
116
116
|
```
|
117
|
+
[Codepenサンプル](https://codepen.io/hatena19/pen/jOPZyyx)
|
117
118
|
|
118
119
|
時間がないので余白とか、冗長な部分はそのままなので、これをたたき台にしてみてください。
|
3
コード修正
answer
CHANGED
@@ -5,21 +5,114 @@
|
|
5
5
|
とりあえず、下記のような感じ。
|
6
6
|
|
7
7
|
```html
|
8
|
+
<main>
|
9
|
+
|
10
|
+
<div class="box"></div>
|
11
|
+
<div class="content">たひてぞぽぞばれぐてひろどにらぼもぎゎぃそんつぢゅぴぢにどくぁぶはぇきぼねおひろ</div>
|
12
|
+
<div class="box-bottom">
|
13
|
+
<p>八木 歓菜</p>
|
14
|
+
<p class="gray">部署 4</p>
|
15
|
+
</div>
|
16
|
+
<div class="icon-bottom">
|
17
|
+
<img src="http://placehold.jp/80x80.png">
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<div class="box2"></div>
|
21
|
+
<div class="content2">ぷゎょゎぼむべぁうくれげゑうぃちぽびぽじふすらざまぴせぴろとぜげゎぜこをあこでべ</div>
|
22
|
+
<div class="box-bottom2">
|
23
|
+
<p>安達 和樹</p>
|
24
|
+
<p class="gray">部署 4</p>
|
25
|
+
</div>
|
26
|
+
<div class="icon-bottom2">
|
27
|
+
<img src="http://placehold.jp/80x80.png">
|
28
|
+
</div>
|
29
|
+
|
30
|
+
<div class="box3"></div>
|
31
|
+
<div class="content3">ぅひみぺつぇげでいぎみがちぢかひげずふをけぬそへられべゑやまぇげかぷい</div>
|
32
|
+
<div class="box-bottom3">
|
33
|
+
<p>泉 恵華</p>
|
34
|
+
<p class="gray">部署 2</p>
|
35
|
+
</div>
|
36
|
+
<div class="icon-bottom3">
|
37
|
+
<img src="http://placehold.jp/80x80.png">
|
38
|
+
</div>
|
39
|
+
|
40
|
+
</main>
|
41
|
+
```
|
42
|
+
|
43
|
+
```css
|
8
44
|
main {
|
9
45
|
display: grid;
|
10
|
-
grid-template-columns:
|
46
|
+
grid-template-columns: 1fr max-content max-content;
|
47
|
+
grid-template-rows: auto auto auto auto auto auto;
|
11
48
|
grid-gap: 5px;
|
12
49
|
}
|
13
|
-
```
|
14
50
|
|
15
|
-
```css
|
16
51
|
.content {
|
52
|
+
padding: 15px 25px 15px 15px;
|
17
53
|
grid-column: 1 / 4;
|
54
|
+
grid-row: 1 / 2;
|
18
55
|
}
|
56
|
+
|
19
57
|
.box-bottom {
|
20
|
-
|
58
|
+
grid-column: 2 / 3;
|
59
|
+
grid-row: 2 / 3;
|
21
60
|
}
|
22
61
|
.icon-bottom {
|
23
|
-
|
62
|
+
grid-column: 3 / 4;
|
63
|
+
grid-row: 2 / 3;
|
24
64
|
}
|
65
|
+
|
66
|
+
.box {
|
67
|
+
grid-column: 1 / 4;
|
68
|
+
grid-row: 1 / 3;
|
69
|
+
box-shadow: 0 5px 10px rgba(0,0,0,0.3);
|
70
|
+
border-radius: 10px;
|
71
|
+
}
|
72
|
+
|
73
|
+
.content2 {
|
74
|
+
padding: 15px 25px 15px 15px;
|
75
|
+
grid-column: 1 / 4;
|
76
|
+
grid-row: 3 / 4;
|
77
|
+
}
|
78
|
+
|
79
|
+
.box-bottom2 {
|
80
|
+
grid-column: 2 / 3;
|
81
|
+
grid-row: 4 / 5;
|
82
|
+
}
|
83
|
+
.icon-bottom2 {
|
84
|
+
grid-column: 3 / 4;
|
85
|
+
grid-row: 4 / 5;
|
86
|
+
}
|
87
|
+
|
88
|
+
.box2 {
|
89
|
+
grid-column: 1 / 4;
|
90
|
+
grid-row: 3 / 5;
|
91
|
+
box-shadow: 0 5px 10px rgba(0,0,0,0.3);
|
92
|
+
border-radius: 10px;
|
93
|
+
}
|
94
|
+
|
95
|
+
.content3 {
|
96
|
+
padding: 15px 25px 15px 15px;
|
97
|
+
grid-column: 1 / 4;
|
98
|
+
grid-row: 5 / 6;
|
99
|
+
}
|
100
|
+
|
101
|
+
.box-bottom3 {
|
102
|
+
grid-column: 2 / 3;
|
103
|
+
grid-row: 6 / 7;
|
104
|
+
}
|
105
|
+
.icon-bottom3 {
|
106
|
+
grid-column: 3 / 4;
|
107
|
+
grid-row: 6 / 7;
|
108
|
+
}
|
109
|
+
|
110
|
+
.box3 {
|
111
|
+
grid-column: 1 / 4;
|
112
|
+
grid-row: 5 / 7;
|
113
|
+
box-shadow: 0 5px 10px rgba(0,0,0,0.3);
|
114
|
+
border-radius: 10px;
|
115
|
+
}
|
25
|
-
```
|
116
|
+
```
|
117
|
+
|
118
|
+
時間がないので余白とか、冗長な部分はそのままなので、これをたたき台にしてみてください。
|
2
修正
answer
CHANGED
@@ -1,41 +1,25 @@
|
|
1
|
+
Flexboxでは無理っぽい。
|
2
|
+
|
3
|
+
CSS Grid の出番かな。
|
4
|
+
|
1
|
-
|
5
|
+
とりあえず、下記のような感じ。
|
6
|
+
|
2
7
|
```html
|
3
|
-
<div class="wrapper">
|
4
|
-
<div class="inner">
|
5
|
-
|
8
|
+
main {
|
6
|
-
</div>
|
7
|
-
</div>
|
8
|
-
<div class="wrapper">
|
9
|
-
<div class="inner">
|
10
|
-
|
9
|
+
display: grid;
|
11
|
-
</div>
|
12
|
-
</div>
|
13
|
-
<div class="wrapper">
|
14
|
-
|
10
|
+
grid-template-columns: 1auto 1max-content 1max-content;
|
15
|
-
aaaaaaaaaaaaaaaaaaaaaaaa
|
16
|
-
|
11
|
+
grid-gap: 5px;
|
17
|
-
|
12
|
+
}
|
18
|
-
<div class="wrapper">
|
19
|
-
<div class="inner">
|
20
|
-
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
21
|
-
</div>
|
22
|
-
</div>
|
23
13
|
```
|
24
14
|
|
25
15
|
```css
|
26
|
-
.
|
16
|
+
.content {
|
27
|
-
display: flex;
|
28
|
-
|
17
|
+
grid-column: 1 / 4;
|
29
|
-
max-width: 500px;
|
30
|
-
border: 1px solid gray;
|
31
|
-
margin-bottom: 10px;
|
32
18
|
}
|
33
|
-
|
34
|
-
.
|
19
|
+
.box-bottom {
|
35
|
-
display: inline-block;
|
36
|
-
|
20
|
+
grid-column: 2 / 3;
|
37
|
-
padding: 5px;
|
38
21
|
}
|
22
|
+
.icon-bottom {
|
23
|
+
grid-column: 3 / 4;
|
24
|
+
}
|
39
|
-
```
|
25
|
+
```
|
40
|
-
|
41
|
-

|
1
修正
answer
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
とりあえずエスパー回答すると、
|
1
|
+
~~とりあえずエスパー回答すると、~~ しまった!投稿したらHTMLが追記されていた。
|
2
|
-
|
3
2
|
```html
|
4
3
|
<div class="wrapper">
|
5
4
|
<div class="inner">
|