1

FlipClock.jsに問題があります。以下に、私のサイトのコード サンプルを示します。

HTML 部分:

 <div class="row">
     <div class="col-md-2"></div>
     <div class="col-md-8 text-center">
          <div id="buttons">
               <div class="my-clock"></div>
          </div>
     </div>
 <div>

およびJavaScript部分:

    <script type="text/javascript">
        var clock;

        $(document).ready(function() {

            // Grab the current date
            var currentDate = new Date();

            // Set some date in the past. In this case, it's always been since Jan 1
            var pastDate  = new Date("2016-02-20 10:00:00");

            // Calculate the difference in seconds between the future and current date
            var diff = pastDate.getTime() / 1000 - currentDate.getTime() / 1000;

            // Instantiate a coutdown FlipClock
            clock = $('.my-clock').FlipClock(diff, {
                clockFace: 'DailyCounter',
                countdown: true
            });

        });
    </script>

Chrome の画面は次のとおりです。

ここに画像の説明を入力

と Firefox:

ここに画像の説明を入力

Firefox では、カウンターはまったく機能しません。私は何が間違っている可能性がありますか?

4

0 に答える 0