回答編集履歴
1
説明追加
test
CHANGED
@@ -23,3 +23,85 @@
|
|
23
23
|
}
|
24
24
|
|
25
25
|
```
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
おまけ
|
30
|
+
|
31
|
+
---
|
32
|
+
|
33
|
+
想像以上にプラスが付いたので、真面目なのも追加。
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
```html
|
38
|
+
|
39
|
+
<dl class="shop_info">
|
40
|
+
|
41
|
+
<dt>住所</dt>
|
42
|
+
|
43
|
+
<dd>〇〇市</dd>
|
44
|
+
|
45
|
+
<dt>電話番号</dt>
|
46
|
+
|
47
|
+
<dd>099-999-9999</dd>
|
48
|
+
|
49
|
+
<dt>営業時間</dt>
|
50
|
+
|
51
|
+
<dd>09:30 ~ 18:00</dd>
|
52
|
+
|
53
|
+
</dl>
|
54
|
+
|
55
|
+
```
|
56
|
+
|
57
|
+
```css
|
58
|
+
|
59
|
+
* {
|
60
|
+
|
61
|
+
box-sizing: border-box;
|
62
|
+
|
63
|
+
}
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
.shop_info {
|
68
|
+
|
69
|
+
display: flex;
|
70
|
+
|
71
|
+
flex-wrap: wrap;
|
72
|
+
|
73
|
+
}
|
74
|
+
|
75
|
+
.shop_info > dt,.shop_info > dd {
|
76
|
+
|
77
|
+
padding: 5px;
|
78
|
+
|
79
|
+
margin: 0 0 10px 0;
|
80
|
+
|
81
|
+
}
|
82
|
+
|
83
|
+
.shop_info > dt {
|
84
|
+
|
85
|
+
flex: 0 0 120px;
|
86
|
+
|
87
|
+
padding: 5px;
|
88
|
+
|
89
|
+
margin: 0 0 10px 0;
|
90
|
+
|
91
|
+
}
|
92
|
+
|
93
|
+
.shop_info > dd {
|
94
|
+
|
95
|
+
flex: 0 0 calc(100% - 160px);
|
96
|
+
|
97
|
+
border-left: 1px solid;
|
98
|
+
|
99
|
+
padding-left: 40px;
|
100
|
+
|
101
|
+
}
|
102
|
+
|
103
|
+
```
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
[CSS dl dt dd デザインサンプル](https://codepen.io/hatena19/pen/poNKmVE)
|