回答編集履歴
2
追記
test
CHANGED
@@ -39,3 +39,77 @@
|
|
39
39
|
}
|
40
40
|
|
41
41
|
```
|
42
|
+
|
43
|
+
追記: cerfwebさん回答の疑似要素も使って九重 (コード中のカラーは上が外側、下に行くほど内側の色となるよう並べてあります)
|
44
|
+
|
45
|
+
```CSS
|
46
|
+
|
47
|
+
div {
|
48
|
+
|
49
|
+
width: 600px;
|
50
|
+
|
51
|
+
height: 400px;
|
52
|
+
|
53
|
+
margin: 30px;
|
54
|
+
|
55
|
+
box-shadow: 0 0 0 20px #ffadad; /* 一番外側の色 */
|
56
|
+
|
57
|
+
outline: solid 10px #ffd6a5;
|
58
|
+
|
59
|
+
border: solid 10px #fdffb6;
|
60
|
+
|
61
|
+
position: relative;
|
62
|
+
|
63
|
+
padding: 30px;
|
64
|
+
|
65
|
+
}
|
66
|
+
|
67
|
+
div::after {
|
68
|
+
|
69
|
+
display: block;
|
70
|
+
|
71
|
+
position: absolute;
|
72
|
+
|
73
|
+
width: calc(100% - 60px);
|
74
|
+
|
75
|
+
height: calc(100% - 60px);
|
76
|
+
|
77
|
+
content: "";
|
78
|
+
|
79
|
+
margin: 50px;
|
80
|
+
|
81
|
+
box-shadow: 0 0 0 20px #caffbf;
|
82
|
+
|
83
|
+
outline: solid 10px #9bf6ff;
|
84
|
+
|
85
|
+
border: solid 10px #a0c4ff;
|
86
|
+
|
87
|
+
top: -30px;
|
88
|
+
|
89
|
+
left: -30px;
|
90
|
+
|
91
|
+
}
|
92
|
+
|
93
|
+
div::before {
|
94
|
+
|
95
|
+
display: block;
|
96
|
+
|
97
|
+
position: absolute;
|
98
|
+
|
99
|
+
width: calc(100% - 120px);
|
100
|
+
|
101
|
+
height: calc(100% - 120px);
|
102
|
+
|
103
|
+
content: "";
|
104
|
+
|
105
|
+
margin: 20px;
|
106
|
+
|
107
|
+
box-shadow: 0 0 0 20px #bdb2ff;
|
108
|
+
|
109
|
+
outline: solid 10px #ffc6ff;
|
110
|
+
|
111
|
+
border: solid 10px #eddcd2; /* 一番内側の色 */
|
112
|
+
|
113
|
+
}
|
114
|
+
|
115
|
+
```
|
1
追記
test
CHANGED
@@ -17,3 +17,25 @@
|
|
17
17
|
}
|
18
18
|
|
19
19
|
```
|
20
|
+
|
21
|
+
追記: outlineも使って三重
|
22
|
+
|
23
|
+
```CSS
|
24
|
+
|
25
|
+
div {
|
26
|
+
|
27
|
+
width: 600px;
|
28
|
+
|
29
|
+
height: 400px;
|
30
|
+
|
31
|
+
margin: 30px;
|
32
|
+
|
33
|
+
box-shadow: 0 0 0 20px #01FA00;
|
34
|
+
|
35
|
+
outline: solid 10px #CF88EC;
|
36
|
+
|
37
|
+
border: solid 10px #FF9400;
|
38
|
+
|
39
|
+
}
|
40
|
+
|
41
|
+
```
|