:activeaddedanimationclick が無効であるという問題がよく発生します。今日は、URL ジャンプ履歴を記録しない方法を紹介します。 。
a タグ: アクティブ プラス アニメーションのクリックは無効です.haorooms{ -webkit-animation: jpyd 1.5s cubic-bezier(0,.98,.44,1) both; animation: jpyd 1.5s cubic-bezier(0,.98,.44,1) both;} .haorooms:active{ -webkit-animation: zoomOuts 1s ; animation: zoomOuts 1s; }
<a class="haorooms delay3 " href="/jingpin/" ></a>
ontouchend="window.location.href='/jingpin/'"
history.replaceState history.pushState(state, title, url)
オブジェクトに新しいレコードを生成しません。このメソッドを使用すると、新しい URL によって History オブジェクト内の現在のレコードが上書きされます。
したがって、次のようにコードを書くことができます:<ul id="haorooms"> <li><a href="http://www.haorooms.com/archives">标签一</a></li> <li><a href="http://www.haorooms.com/tools/index">标签二</a></li> </ul> $('#haorooms li a').on('click', function (event) { //tab中a标签点击 event.preventDefault(); location.replace(this.href); })
$('#haorooms li a').on('click', function (event) { event.preventDefault(); history.replaceState(null, document.title, this.href.split('#')[0] + '#'); location.replace(''); })
var fnUrlReplace = function (eleLink) { if (!eleLink) { return; } var href = eleLink.href; if (href && /^#|javasc/.test(href) === false) { if (history.replaceState) { history.replaceState(null, document.title, href.split('#')[0] + '#'); location.replace(''); } else { location.replace(href); } } };
$('#haorooms li a').on('click', function (event) { if (event && event.preventDefault) { event.preventDefault(); } fnUrlReplace(this); return false; })
CSS3 を使用して照明とテキストアニメーションを作成する方法
以上がa:アクティブ プラス アニメーション クリック無効な解決策の詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。