実現しないことは、以下のソースでfirefox、chrome、IEでは問題なく動作するのですが、
safari(PC,iphone)ではcssの取得がされません。
原因が分かる方、ご教授いただけますでしょうか。
keyframeは、別途cssに記載しております。
$(function () { $('.thumb-1').css({ 'animation': 'move1 25s ease-in-out -' + Math.random() * 25 + 's infinite alternate forwards running', '-webkit-animation': 'move1 25s ease-in-out -' + Math.random() * 25 + 's infinite alternate forwards running'}); });
.thumb-1{ position:absolute; top:-100px; left:-200px; }
気になる質問をクリップする
クリップした質問は、後からいつでもMYページで確認できます。
またクリップした質問に回答があった際、通知やメールを受け取ることができます。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
回答2件
0
ベストアンサー
$(function() {
$('.thumb-1').css({
'-webkit-animation-name':'move1',
'-webkit-animation-duration':'25s',
'-webkit-animation-timing-function':'ease-in-out',
'-webkit-animation-delay':' -' + Math.random() * 20 + 's ',
'-webkit-animation-iteration-count':'infinite',
'-webkit-animation-direction':'alternate',
'-webkit-animation-fill-mode':'forwards',
'-webkit-animation-play-state':'running',
'animation-name':'move1',
'animation-duration':'25s',
'animation-timing-function':'ease-in-out',
'animation-delay':' -' + Math.random() * 20 + 's ',
'animation-iteration-count':'infinite',
'animation-direction':'alternate',
'animation-fill-mode':'forwards',
'animation-play-state':'running'});
$('.thumb-2').css({
'-webkit-animation': 'move2 20s ease -' + Math.random() * 20 + 's infinite alternate forwards running',
'animation': 'move2 20s ease -' + Math.random() * 20 + 's infinite alternate forwards running'});
$('.thumb-3').css({
'-webkit-animation': 'move3 30s ease-in-out -' + Math.random() * 30 + 's infinite alternate forwards running',
'animation': 'move3 30s ease-in-out -' + Math.random() * 30 + 's infinite alternate forwards running'});
$('.thumb-4').css({
'-webkit-animation': 'move4 30s ease-in-out -' + Math.random() * 30 + 's infinite alternate forwards running',
'animation': 'move4 30s ease-in-out -' + Math.random() * 30 + 's infinite alternate forwards running'});
$('.thumb-5').css({
'-webkit-animation': 'move5 30s ease-in-out -' + Math.random() * 30 + 's infinite alternate forwards running',
'animation': 'move5 30s ease-in-out -' + Math.random() * 30 + 's infinite alternate forwards running'});
$('.thumb-6').css({
'-webkit-animation': 'move6 21s ease-in-out -' + Math.random() * 21 + 's infinite alternate forwards running',
'animation': 'move6 21s ease-in-out -' + Math.random() * 21 + 's infinite alternate forwards running'});
$('.thumb-7').css({
'-webkit-animation': 'move7 36s ease-in-out -' + Math.random() * 36 + 's infinite alternate forwards running',
'animation': 'move7 36s ease-in-out -' + Math.random() * 36 + 's infinite alternate forwards running'});
});
投稿2016/02/22 10:27
退会済みユーザー
総合スコア0
0
同様の質問で、「keyframesを0%から100%まで全て記述していないから動かない」という回答がされておりました。ご確認ください。(this won't work:とthis will:の部分)
投稿2016/02/21 09:29
編集2016/02/21 09:30総合スコア2092
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2016/02/22 10:04 編集
退会済みユーザー
2016/02/22 10:26
あなたの回答
tips
太字
斜体
打ち消し線
見出し
引用テキストの挿入
コードの挿入
リンクの挿入
リストの挿入
番号リストの挿入
表の挿入
水平線の挿入
プレビュー
質問の解決につながる回答をしましょう。 サンプルコードなど、より具体的な説明があると質問者の理解の助けになります。 また、読む側のことを考えた、分かりやすい文章を心がけましょう。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。