質問編集履歴
1
実際のコードに適用したところ、問題が解決しませんでした。問題の切り分けが適切ではなかったため、詳細を再掲させていただきました。よろしくお願い申し上げます。
test
CHANGED
File without changes
|
test
CHANGED
@@ -97,3 +97,159 @@
|
|
97
97
|
}
|
98
98
|
|
99
99
|
```
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
コードの再掲(より詳細なもの)
|
104
|
+
|
105
|
+
[JSFiddle](https://jsfiddle.net/9jy7k3wu/9/)
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
```html
|
110
|
+
|
111
|
+
<div class="wrapper">
|
112
|
+
|
113
|
+
<div class="effect"></div>
|
114
|
+
|
115
|
+
<form class="" action="#" method="post">
|
116
|
+
|
117
|
+
<span class="logout">
|
118
|
+
|
119
|
+
<button class="logout_button" type="submit" name="logout" value="logout">
|
120
|
+
|
121
|
+
<i class="fas fa-sign-out-alt"></i>
|
122
|
+
|
123
|
+
</button>
|
124
|
+
|
125
|
+
</span>
|
126
|
+
|
127
|
+
</form>
|
128
|
+
|
129
|
+
<span class="logout_pop">ログアウト</span>
|
130
|
+
|
131
|
+
</div>
|
132
|
+
|
133
|
+
```
|
134
|
+
|
135
|
+
```css
|
136
|
+
|
137
|
+
.wrapper{
|
138
|
+
|
139
|
+
width: 200px;
|
140
|
+
|
141
|
+
height: 100px;
|
142
|
+
|
143
|
+
float: left;
|
144
|
+
|
145
|
+
text-align: center;
|
146
|
+
|
147
|
+
position: relative;
|
148
|
+
|
149
|
+
box-sizing: border-box;
|
150
|
+
|
151
|
+
overflow: hidden;
|
152
|
+
|
153
|
+
margin-left: auto;
|
154
|
+
|
155
|
+
z-index: 1;
|
156
|
+
|
157
|
+
background:gray;
|
158
|
+
|
159
|
+
}
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
.effect{
|
164
|
+
|
165
|
+
width:200px;
|
166
|
+
|
167
|
+
height:100px;
|
168
|
+
|
169
|
+
left:-200px;
|
170
|
+
|
171
|
+
top:-100px;
|
172
|
+
|
173
|
+
background:#c7c7c778;
|
174
|
+
|
175
|
+
position:absolute;
|
176
|
+
|
177
|
+
transition:all .5s ease;
|
178
|
+
|
179
|
+
z-index:2;
|
180
|
+
|
181
|
+
}
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
.wrapper:hover .effect{
|
186
|
+
|
187
|
+
left:0;top:0;
|
188
|
+
|
189
|
+
}
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
.logout{
|
194
|
+
|
195
|
+
cursor: pointer;
|
196
|
+
|
197
|
+
margin-left: 10px;
|
198
|
+
|
199
|
+
position: absolute;
|
200
|
+
|
201
|
+
top:17px;
|
202
|
+
|
203
|
+
right:5px;
|
204
|
+
|
205
|
+
z-index: 10;
|
206
|
+
|
207
|
+
opacity: 0;
|
208
|
+
|
209
|
+
}
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
.wrapper:hover .logout{
|
214
|
+
|
215
|
+
display: block;
|
216
|
+
|
217
|
+
opacity: 1;
|
218
|
+
|
219
|
+
}
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
.logout_pop{
|
224
|
+
|
225
|
+
cursor:pointer;
|
226
|
+
|
227
|
+
display: none;
|
228
|
+
|
229
|
+
background:#b3b3b36b;
|
230
|
+
|
231
|
+
position: absolute;
|
232
|
+
|
233
|
+
top: 5px;
|
234
|
+
|
235
|
+
height: 27px;
|
236
|
+
|
237
|
+
border-radius: 5px;
|
238
|
+
|
239
|
+
right: 97px;
|
240
|
+
|
241
|
+
font-size: 11px;
|
242
|
+
|
243
|
+
z-index: 100;
|
244
|
+
|
245
|
+
}
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
.logout:hover + .logout_pop{
|
250
|
+
|
251
|
+
display: block;
|
252
|
+
|
253
|
+
}
|
254
|
+
|
255
|
+
```
|