,

TIẾN ĐỨC BLOG

Blog chia sẽ thủ thuật Miễn Phí

Widget Đếm Ngược Tết 2020 Cho Blogspot


Hế Lô Xin Chào Tất Cả Anh Em Đã Quay Trở Lại Với Blog Phố Nhỏ . Lại Tiếp Tục Với Không Khí Mừng Đảng Mừng Xuân Bla....Bla........ Thì Hôm Nay Mình Sẽ Share Widget Đếm Ngược Đến Xuân Canh Tý 2020 , Do Mình Vừa Vọc Được Bên Blog.LeAnhduc.Pro.Vn . Hehe

DEMO


HƯỚNG DẪN


Bước 1. Đăng nhập vào giao diện Bố Cục.
Bước 2. Thêm Tiện ích HTML/Javascript Và Dán Code Sau :

<div id='sidebar'>
<style>
/* Countdown */
#countdown{position:relative;overflow:hidden;float:left;;width:100%;height:auto;padding:20px 0;box-sizing:border-box;margin-bottom:15px;background:#222222;
border-radius:10px}
#timer{padding-top:0}
#timer div{width:55px;height:55px;line-height:55px;z-index:199;background:transparent;background:#52544A;border-radius:50%;text-align:center;font-size:20px;font-weight:700;color:#fff;display:inline-block;float:left;margin:0 11px}
#timer div:nth-child(1),{margin-left:0}
#timer div:last-child{margin-right:0}
h2.title-countdown{line-height:25px;text-align:center;color:#fff;font-size:15px!important;font-weight:500;text-transform:capitalize;margin:0 20px;margin-bottom:15px;font-family:'Open Sans',sans-serif}
#timer span{color:rgb(78, 50, 136);margin-bottom:20px;font-size:12px;display:block;transform:translate(0,-52%)}
#countdown strong{display:none}
</style>
<div id='countdown'>
<ul class='circles'><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li></ul>
<div id='timer'>
<h2 class='title-countdown'>Đếm ngược thời gian đến tết Canh Tý 2020</h2>
<div id='days'></div>
<div id='hours'></div>
<div id='minutes'></div>
<div id='seconds'></div>
</div>
</div>
<script type='text/javascript'>
//<![CDATA[
// Countdown tet
let timeout = null;
function makeTimer() {
// Edit Here
//---- let endTime = new Date("'01/24/2020 23:59:59 GMT+0700 (SE Asia Standard Time)"); ----
let endTime = new Date("'01/24/2020 23:59:59 GMT+0700 (SE Asia Standard Time)");
endTime = (Date.parse(endTime) / 1000);
let now = new Date();
now = (Date.parse(now) / 1000);
let timeLeft = endTime - now,
days = Math.floor(timeLeft / 86400),
hours = Math.floor((timeLeft - (days * 86400)) / 3600),
minutes = Math.floor((timeLeft - (days * 86400) - (hours * 3600)) / 60),
seconds = Math.floor((timeLeft - (days * 86400) - (hours * 3600) - (minutes * 60)));
if (hours === 0 && minutes === 0 && seconds === 0) {
clearTimeout(timeout);
} else {
if (hours < "10") {
hours = "0" + hours;
}
if (minutes < "10") {
minutes = "0" + minutes;
}
if (seconds < "10") {
seconds = "0" + seconds;
}
$("#days").html(days + "<strong>Ngày</strong>");
$("#hours").html(hours + "<strong>Giờ</strong>");
$("#minutes").html(minutes + "<strong>Phút</strong>");
$("#seconds").html(seconds + "<strong>Giây</strong>");
timeout = setTimeout(makeTimer, 1000);
}
}
makeTimer();
//]]>
</script></div>
Bước 3 . Lưu Lại Và Tận Hưởng Thôi Nào.
- Trong quá trình viết bài chúng tôi sẽ có nhiều thiếu sót mong các bạn đóng góp để chúng tôi rút kinh nghiệm hơn !
- Mọi chi tiết xin liên hệ:
• Email: tienducblog.vn@gmail.com
• Facebook: Fb.com/TienDucCEO
Xin chân thành cảm ơn những đóng góp của bạn để chúng tôi ngày càng phát triển hơn nữa...

● Hãy là con người văn minh từ những câu nói

3 nhận xét:

  • Emoji
  • Parse

  • Chèn ảnh theo mẫu [img]link[/img]
  • Chèn video Youtube theo mẫu [youtube]link[/youtube]
  • Chèn code theo mẫu [pre]code[/pre]. Lưu ý: mã hóa code trước khi bình luận