EFG

https://schema.org/VideoObject... style="position:relative; overflow:hidden; padding-bottom:56.25%">
タイムセール終了まで残り

#CDT {

width: 100%;

text-align: center;

font-size: 49px;

font-weight: bold;

color: #ffffff;

font-family: 'Noto Sans JP', sans-serif;}

#CDT01 {

width: 100%;

text-align: center;

font-size: 49px;

font-weight: bold;

color: #ffffff;

font-family: 'Noto Sans JP', sans-serif;

}

.ttl {

color: #ffffff;

font-size: 28px;

font-weight: 600;

text-align: center;

margin: 0;

line-height: 1.5;

}

.timer {

background: #d00000;

margin: 5px auto;

padding: 5px;

}

function CountdownTimer(elm, tl, mes) {

this.initialize.apply(this, arguments);

}

CountdownTimer.prototype = {

initialize: function (elm, tl, mes) {

this.elem = document.getElementById(elm);

this.tl = tl;

this.mes = mes;

}, countDown: function () {

var timer = '';

var today = new Date();

var day = Math.floor((this.tl - today) / (24 * 60 * 60 * 1000));

var hour = Math.floor(((this.tl - today) % (24 * 60 * 60 * 1000)) / (60 * 60 * 1000));

var min = Math.floor(((this.tl - today) % (24 * 60 * 60 * 1000)) / (60 * 1000)) % 60;

var sec = Math.floor(((this.tl - today) % (24 * 60 * 60 * 1000)) / 1000) % 60 % 60;

var milli = Math.floor(((this.tl - today) % (24 * 60 * 60 * 1000)) / 10) % 100;

var me = this;

if ((this.tl - today) > 0) {

if (day)

timer += '' + day + '日';

if (hour)

timer += '' + hour + '時間';

timer += '' + this.addZero(min) + '分' +

this.addZero(sec) + '秒';

this.elem.innerHTML = timer;

tid = setTimeout(function () {

me.countDown();

}, 10);

} else {

this.elem.innerHTML = this.mes;

return;

}

}, addZero: function (num) {

return ('0' + num).slice(-2);

}

}

function CDT() {

var tl = new Date('2021/5/29 10:00:00');// ここで日付を指定

var timer = new CountdownTimer('CDT', tl, '終了しました');

timer.countDown();

}

function CDT01() {

var tl = new Date('2020/5/29 09:59:00');// ここで日付を指定

var timer = new CountdownTimer('CDT01', tl, '終了しました');

timer.countDown();

}

window.onload = function () {

CDT();

CDT01();

}