質問編集履歴
1
質問させて頂いたコーディングはできましたが、ie,chromeで動作をしないので原因を教えて欲しいです。
test
CHANGED
File without changes
|
test
CHANGED
@@ -15,3 +15,151 @@
|
|
15
15
|
どなたかご教授頂ければ幸いです。
|
16
16
|
|
17
17
|
宜しくお願い致します。
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
追記
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
実際にコーディング出来たのですが、
|
26
|
+
|
27
|
+
safariだけでは動くのですが、ie. chrome 等で動きません。
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
原因がわかれば教えてください。
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
HP
|
36
|
+
|
37
|
+
http://sample.heartwood.work/yf/
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
html
|
42
|
+
|
43
|
+
<table class="a">
|
44
|
+
|
45
|
+
<tr>
|
46
|
+
|
47
|
+
<th>WORK</th>
|
48
|
+
|
49
|
+
<td><div class="draw-line-g"><P></P></div></td>
|
50
|
+
|
51
|
+
</tr>
|
52
|
+
|
53
|
+
</table>
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
css
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
.draw-line-g {
|
62
|
+
|
63
|
+
position: relative;
|
64
|
+
|
65
|
+
display: inline-block;
|
66
|
+
|
67
|
+
text-decoration: none;
|
68
|
+
|
69
|
+
width: 100%;
|
70
|
+
|
71
|
+
}
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
.draw-line-g {
|
76
|
+
|
77
|
+
margin-bottom: 0;
|
78
|
+
|
79
|
+
}
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
.draw-line-g::after {
|
84
|
+
|
85
|
+
border-bottom: solid 2px #000;
|
86
|
+
|
87
|
+
bottom: 0;
|
88
|
+
|
89
|
+
content: "";
|
90
|
+
|
91
|
+
display: block;
|
92
|
+
|
93
|
+
position: absolute;
|
94
|
+
|
95
|
+
right: 0;
|
96
|
+
|
97
|
+
transition: all .3s ease;
|
98
|
+
|
99
|
+
-webkit-transition: all .3s ease;
|
100
|
+
|
101
|
+
width: 0;
|
102
|
+
|
103
|
+
}
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
.isAnimate2-1::after {
|
108
|
+
|
109
|
+
width: 100%;
|
110
|
+
|
111
|
+
}
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
script
|
118
|
+
|
119
|
+
<script>
|
120
|
+
|
121
|
+
$(window).on('scroll', function() {
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
var elem = $('.draw-line-g');
|
126
|
+
|
127
|
+
var isAnimate = 'isAnimate2-1';
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
elem.each(function() {
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
var elemOffset = $(this).offset().top;
|
136
|
+
|
137
|
+
var scrollPos = $(window).scrollTop();
|
138
|
+
|
139
|
+
var wh = $(window).height();
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
if (scrollPos > elemOffset - wh + (wh / 4)) {
|
144
|
+
|
145
|
+
$(this).addClass(isAnimate);
|
146
|
+
|
147
|
+
}
|
148
|
+
|
149
|
+
});
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
});
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
</script>
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
で実装しております。
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
ご教授頂ければ幸いです。
|