回答編集履歴

1

修正

2017/07/20 08:46

投稿

退会済みユーザー
test CHANGED
@@ -8,19 +8,37 @@
8
8
 
9
9
  ``` css
10
10
 
11
- #contact_fixed_sp {
11
+ @media all and (min-width: 481px) {
12
12
 
13
+ #contact_fixed_sp {
14
+
13
- display: none;
15
+ display: none;
16
+
17
+ }
14
18
 
15
19
  }
16
20
 
17
21
 
18
22
 
19
- @media all and (min-width: 480px) {
23
+ @media all and (max-width: 480px) {
20
24
 
21
25
  #contact_fixed_sp {
22
26
 
23
27
  display: none;
28
+
29
+ position: fixed;
30
+
31
+ right: 0;
32
+
33
+ top: 0;
34
+
35
+ }
36
+
37
+
38
+
39
+ #contact_fixed_sp.show {
40
+
41
+ display: inline-block;
24
42
 
25
43
  }
26
44
 
@@ -48,7 +66,15 @@
48
66
 
49
67
  .stop()
50
68
 
51
- .fadeIn("slow");
69
+ .fadeIn("slow", function () {
70
+
71
+ $(this)
72
+
73
+ .css({ display: '', opacity: '', })
74
+
75
+ .addClass('show');
76
+
77
+ });
52
78
 
53
79
  }
54
80
 
@@ -58,7 +84,15 @@
58
84
 
59
85
  .stop()
60
86
 
61
- .fadeOut("slow");
87
+ .fadeOut("slow", function () {
88
+
89
+ $(this)
90
+
91
+ .css({ display: '', opacity: '', })
92
+
93
+ .removeClass('show');
94
+
95
+ });
62
96
 
63
97
  }
64
98