回答編集履歴
3
三角形の高さを調整
answer
CHANGED
@@ -1,48 +1,52 @@
|
|
1
1
|
三角形だけ二重線にするのは案外難しい。
|
2
2
|
以下のCSSを使って、`div`要素に`class="balloon"`を指定すると、こんな感じ。
|
3
3
|
|
4
|
+
補足: 三角形部分をより小さくするために、rotateとscaleYで変形させた。この変形により細く見えてしまう三角形部分のborderの太さや位置も微調整。
|
5
|
+
|
4
|
-

|
6
|
+

|
5
|
-
|
7
|
+
↓
|
8
|
+

|
9
|
+
|
6
10
|
```CSS
|
7
11
|
.balloon {
|
8
|
-
|
12
|
+
position: relative;
|
9
|
-
|
13
|
+
height: 80px;
|
10
|
-
|
14
|
+
width: 400px;
|
11
|
-
|
15
|
+
color: black;
|
12
|
-
|
16
|
+
background: white;
|
13
|
-
|
17
|
+
border: 2px lightblue solid;
|
14
18
|
}
|
15
19
|
|
16
20
|
.balloon:before {
|
17
|
-
|
21
|
+
content: "";
|
18
|
-
|
22
|
+
position: absolute;
|
19
|
-
|
23
|
+
top: 100%;
|
20
|
-
|
24
|
+
left: 50%;
|
21
|
-
|
25
|
+
margin-left: -5px;
|
22
|
-
|
26
|
+
height: 20px;
|
23
|
-
|
27
|
+
width: 20px;
|
24
|
-
|
28
|
+
background: inherit;
|
25
|
-
|
29
|
+
transform: scaleY(0.5) rotate(45deg);
|
26
|
-
|
30
|
+
transform-origin: top right;
|
27
31
|
}
|
28
32
|
|
29
33
|
.balloon:after {
|
30
|
-
|
34
|
+
content: "";
|
31
|
-
|
35
|
+
position: absolute;
|
32
|
-
|
36
|
+
top: 100%;
|
33
|
-
|
37
|
+
left: 50%;
|
34
|
-
|
38
|
+
margin-top: 3px;
|
35
|
-
|
39
|
+
margin-left: -7px;
|
36
|
-
|
40
|
+
height: 20px;
|
37
|
-
|
41
|
+
width: 20px;
|
38
|
-
|
42
|
+
background: transparent;
|
39
|
-
|
43
|
+
transform: scaleY(0.5) rotate(45deg);
|
40
|
-
|
44
|
+
transform-origin: top right;
|
41
|
-
|
45
|
+
border-bottom: 8px lightblue double;
|
42
|
-
|
46
|
+
border-right: 8px lightblue double;
|
43
47
|
}
|
44
48
|
|
45
49
|
.balloon * {
|
46
|
-
|
50
|
+
text-align: center;
|
47
51
|
}
|
48
52
|
```
|
2
CSSを誤ペーストしていたのを修正
answer
CHANGED
@@ -4,5 +4,45 @@
|
|
4
4
|

|
5
5
|
|
6
6
|
```CSS
|
7
|
+
.balloon {
|
8
|
+
position: relative;
|
9
|
+
height: 80px;
|
10
|
+
width: 400px;
|
11
|
+
color: black;
|
12
|
+
background: white;
|
13
|
+
border: 2px lightblue solid;
|
14
|
+
}
|
15
|
+
|
16
|
+
.balloon:before {
|
17
|
+
content: "";
|
18
|
+
position: absolute;
|
19
|
+
top: 100%;
|
20
|
+
left: 50%;
|
21
|
+
margin-left: -5px;
|
22
|
+
height: 20px;
|
23
|
+
width: 20px;
|
24
|
+
background: inherit;
|
25
|
+
transform: rotate(45deg);
|
26
|
+
transform-origin:top right;
|
27
|
+
}
|
28
|
+
|
29
|
+
.balloon:after {
|
30
|
+
content: "";
|
31
|
+
position: absolute;
|
32
|
+
top: 100%;
|
33
|
+
left: 50%;
|
34
|
+
margin-top: 4px;
|
35
|
+
margin-left: -7px;
|
36
|
+
height: 20px;
|
37
|
+
width: 20px;
|
38
|
+
background: transparent;
|
39
|
+
transform: rotate(45deg);
|
40
|
+
transform-origin:top right;
|
7
|
-
|
41
|
+
border-bottom: 6px lightblue double;
|
42
|
+
border-right: 6px lightblue double;
|
43
|
+
}
|
44
|
+
|
45
|
+
.balloon * {
|
46
|
+
text-align: center;
|
47
|
+
}
|
8
48
|
```
|
1
三角形の位置を微調整
answer
CHANGED
@@ -1,48 +1,8 @@
|
|
1
1
|
三角形だけ二重線にするのは案外難しい。
|
2
2
|
以下のCSSを使って、`div`要素に`class="balloon"`を指定すると、こんな感じ。
|
3
3
|
|
4
|
-

|
5
5
|
|
6
6
|
```CSS
|
7
|
-
.balloon {
|
8
|
-
position: relative;
|
9
|
-
height: 80px;
|
10
|
-
width: 400px;
|
11
|
-
color: black;
|
12
|
-
background-color: white;
|
13
|
-
border: 2px lightblue solid;
|
14
|
-
}
|
15
|
-
|
16
|
-
.balloon:before {
|
17
|
-
content: "";
|
18
|
-
position: absolute;
|
19
|
-
top: 100%;
|
20
|
-
left: 50%;
|
21
|
-
margin-left: -12px;
|
22
|
-
height: 20px;
|
23
|
-
width: 20px;
|
24
|
-
background-color: inherit;
|
25
|
-
transform: rotate(45deg);
|
26
|
-
transform-origin:top right;
|
27
|
-
}
|
28
|
-
|
29
|
-
.balloon:after {
|
30
|
-
content: "";
|
31
|
-
position: absolute;
|
32
|
-
top: 100%;
|
33
|
-
left: 50%;
|
34
|
-
margin-top: 4px;
|
35
|
-
margin-left: -14px;
|
36
|
-
height: 20px;
|
37
|
-
width: 20px;
|
38
|
-
background: transparent;
|
39
|
-
transform: rotate(45deg);
|
40
|
-
transform-origin:top right;
|
41
|
-
|
7
|
+
folder_name = tkinter.filedialog.askdirectory(initialdir=iDir)
|
42
|
-
border-right: 6px lightblue double;
|
43
|
-
}
|
44
|
-
|
45
|
-
.balloon * {
|
46
|
-
text-align: center;
|
47
|
-
}
|
48
8
|
```
|