K
Khanh Blogger
Trang chủ
5

Liên hệ

  • facebook.com/tknblog
  • admin@khanhblogger.com
  • +841653009392

Loading...

Loading...

বিজ্ঞান đã thêm một thủ thuật mới

Với nhiều nút Demo, download được chia sẻ ở nhiều trang web thì hầu hết đều để nền cũng như hiệu ứng Hover khá quen thuộc. Chính vì thế, để tạo sự mới lạ, sự thu hút và tăng tính chuyên nghiệp cho blogspot thì hôm nay mình sẽ chia sẻ cho các bạn nút Demo - Download với hiệu ứng hover kèm theo màu sắc hài hòa tuyệt đẹp cho Blogspot ! Demo các bạn có thể xem ngay bên dưới.
nút demo hiệu ứng hover màu sắc tuyệt đẹp



Các bước thực hiện
Bước 1: Chèn đoạn CSS sau vào dưới thẻ <style> của Blogspot:

.btn_tkn {
transition: .4s;
position: relative;
display: inline-block;
width: 160px;
font-size: 1em;
font-weight: bold;
line-height: 45px;
text-align: center;
text-transform: uppercase;
background-color: transparent;
cursor: pointer;
text-decoration:none!important;
font-family: 'Roboto', sans-serif;
font-weight:900;
font-size:15px;
letter-spacing: 0.045em;
}
.btn_tkn svg {
position: absolute;
top: 0;
left: 0;
}
.btn_tkn svg rect {
//stroke: #EC0033;
stroke-width: 2;
stroke-dasharray: 353, 0;
stroke-dashoffset: 0;
-webkit-transition: all 600ms ease;
transition: all 600ms ease;
}
.btn_tkn span{
background: rgb(255,130,130);
background: -moz-linear-gradient(left, rgba(255,130,130,1) 0%, rgba(225,120,237,1) 100%);
background: -webkit-linear-gradient(left, rgba(255,130,130,1) 0%,rgba(225,120,237,1) 100%);
background: linear-gradient(to right, rgba(255,130,130,1) 0%,rgba(225,120,237,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff8282', endColorstr='#e178ed',GradientType=1 );
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.btn_tkn:hover svg rect {
stroke-width: 1;
stroke-dasharray: 123, 660;
stroke-dashoffset: 607;
}
.btn_tkn:hover {letter-spacing: 0.3em}
}

Bước 2: Chèn đoạn JS sau vào phía trên thẻ </head>:

<script>
function demotkn (textdemo, linkdemo, titlelinkdemo) {
document.write ("<center><a href='" + linkdemo + "' title='" + titlelinkdemo + "' target='_blank' class='btn_tkn'><svg width='160' height='45'><defs><linearGradient id='grad1'><stop offset='0%' stop-color='#FF8282'/><stop offset='100%' stop-color='#E178ED' /></linearGradient></defs><rect class='vxt_tkn_contetw3' x='5' y='5' rx='13' fill='none' stroke='url(#grad1)' width='150' height='35'></rect></svg><span>" + textdemo + "</span></a></center>");
}
</script>

Bước 3: Vì nó có nhiều hiệu ứng CSS nên khi chèn sẽ cần rất nhiều thẻ như SVG, RECT... Chính vì vậy mình đã dùng JS rút gọn như ở bước 2. Ở bước này là bước chèn vào nơi hiển thị. Khi chèn vào bài viết hay 1 trang, các bạn chuyển sang chế độ HTML rồi chèn đoạn JS sau vào nơi muốn hiển thị Button:

<script>
demotkn ("văn bản hiển thị", "url demo, download", "title url");
</script>
Văn bản hiển thị đơn giản là text sẽ hiển thị của button, ví dụ: XEM DEMO chẳng hạn.
Url Demo, download là liên kết tới 1 Demo hay Download. VD: http://demo.linkthuthuat.com/2018/01/demo-button-khanhbloggerdotcom.html
title url là tiêu đề liên kết, bạn có thể không cần thêm nó !
VD CODE:
<script>
demotkn ("XEM DEMO", "http://demo.linkthuthuat.com/2018/01/demo-button-khanhbloggerdotcom.html", "Tạo nút Demo - Download với hiệu ứng hover màu sắc tuyệt đẹp cho blogspot");
</script>
Như đã nói thì đối với những bạn không quan tâm SEO thì có thể bỏ title URL, lúc đó code sẽ là:
VD:
<script>
demotkn ("XEM DEMO", "http://demo.linkthuthuat.com/2018/01/demo-button-khanhbloggerdotcom.html");
</script>

Với một Button với nhiều hiệu ứng màu sắc hover như vậy nhưng khi chèn vào blog thì rất nhỏ gọn đúng không nào ! Mặc dù là JS nhưng nó KHÔNG hề ảnh hưởng đến tốc độ tải trang nhé !
Hi vọng với nút Demo - Download với hiệu ứng hover màu sắc tuyệt đẹp này sẽ giúp blog các bạn đẹp hơn như cái nút :v cũng như tăng tính chuyên nghiệp hơn !

Chúc các bạn thành công !
Bạn và người khác
0 bình luận
Bạn và người khác
0 bình luận

বিজ্ঞান đã thêm một sự kiện

Welcome to TKN - Khanh Blogger. Hôm nay sẽ là một sự kiện đặc biệt. Nó sẽ không là "Mừng blog đạt..." hay "Tri ân độc giả..." mà đây là sự kiện lần đầu tiên mình tổ chức đếm ngược năm mới 2018 với nhiều lý do... Trong thời gian qua mình ít có thời gian vào blog nên hôm nay mình sẽ tổ chức sự kiện này với nhiều phần quà hấp dẫn ! Các bạn sẽ không bỏ ra bất kì điều gì mà chỉ cần đua Top Comments tranh hạng với những yêu cầu bên dưới. Năm nay, năm 2018 , năm con chó cũng rất hào hứng với năm này bởi nhiều lý do và chắc các bạn cũng hiểu. Bắt đầu thôi :v

Nhận quà khủng bằng cách bình luận cùng TKN nào :v

Thông tin sự kiện
  • Thời gian: Từ 21/01/2018 - 10/2/2018
  • Thời gian chốt: Đang cập nhật
  • Nhà tài trợ: Niệm Style, CV Media, LinkThuThuat, ANH Internet Cafe - Domain Register
  • Tổ chức tại: khanhblogger.com
Chi tiết - Cách thức tham gia sự kiện
Được sự tài trợ của các nhãn hàng, với nhiều phần quà khủng rất xứng đáng cho các bạn tham gia. Trong thời gian diễn ra sự kiện, khung TOP Comments sẽ được hiển thị dưới bài viết để các bạn biết vị trí của mình. Các bạn hãy tích cực bình luận vào các bài viết của Khanh Blogger với nội dung liên quan, hợp lệ với những yêu cầu, chỉ tiêu bên dưới. Điều này nhằm gắn kết bạn và tôi lại cũng như tăng sự tương tác trong thời gian qua.

Yêu cầu tham gia
  • Chia sẻ bài viết này lên Facebook ở chế độ công khai với Hastag: #Event_Khanhblogger
  • Bình luận các bài viết với nội dung hợp lệ, liên quan.
  • Không bình luận 1 chữ, 1 từ, các từ ngữ, ngôn từ mà ai cũng biết VD như: "Admin ơi", "admin đẹp trai"...
  • Không Spam link
  • Những bình luận bị admin xóa sẽ không được tính.

Điều kiện sự kiện
  • Top 1: Đứng Top 1 BXH Event và tối thiểu 70 bình luận
  • Top 2: Đứng Top 1 hoặc 2 BXH Event và tối thiểu 50 bình luận
  • Top 3: Đứng Top 1 hoặc 2 hoặc 3 BXH Event và tối thiểu 40 bình luận
  • Top 4: Đứng Top 1 hoặc 2 hoặc 3 hoặc 4 BXH Event và tối thiểu 35 bình luận

Giải thưởng
  • Top 1: 1 Tên miền quốc tế .COM hoặc .NET (1 năm)
  • Top 2: Template Facebook Parody by TKN - Demo
  • Top 3: Template Ẩn link (trị giá 7$)  - Demo
  • Top 4: Card điện thoại 50.000 VNĐ
Hãy đua top ngay từ bây giờ nào ! Những phần quà Khủng và Khủng đang chờ bạn rinh về !

Bạn và người khác
119 bình luận
Bạn và người khác
119 bình luận

বিজ্ঞান đã thêm một thủ thuật mới

Với các blog hiện nay đang ngày càng phát triển và cần những thứ đổi mới, những widget chức năng hữu ích như Top người bình luận, Máy nghe nhạc (music player)... Và hôm nay, KhanhBlogger xin được chia sẻ cho các bạn một MÁY NGHE NHẠC do mình nghiên cứu từ lâu kết hợp với W3Shools (Các bạn nên vào đây để học). Mấy hôm nay mình đang nghiên cứu máy phát nhạc cực cool cho các bạn, trong đó dùng khá nhiều JS mẫu từ W3shools rất hữu ích cho mình. Bắt đầu thôi !

máy nghe nhạc cho blogspot


Các bước thực hiện
Bước 1: Chèn CSS này vào dưới thẻ <style> của blogspot:
div.wrappertt{ width:100%; height:530px; box-shadow: 0 2px 3px 0 rgba(0,0,0,0.1), 0 2px 4px 0 rgba(0,0,0,0.12); font-family: Roboto; transform-origin:top center; } .showMP1{ animation: showMusicPlayer 1000ms 300ms ease-in-out forwards; } .lzz{ position:absolute; left:50%; text-align:center; margin-left:-60px; margin-top:200px; font-size:10px; color:rgba(0,0,0,1); animation:pw 900ms ease-in-out infinite; } @keyframes pw{ 0%,100%{ opacity:1; } 70%{ opacity:0.7; } } @keyframes showMusicPlayer{ 0%{ transform:translateY(-550px); } 80%{ transform:translateY(10px); } 100%{ transform:translateY(0px); } } .song-loader{ position:absolute; width:4px; height:70px; background:#a26c37; display:inline-block; left:50%; top:120px; margin-left:-2px; opacity:1; animation:dancingBars 1000ms ease-in infinite; } .song-loader-anim{ animation:dancingBars 1000ms ease-in infinite; } .song-loader:after,.song-loader:before{ position:absolute; content:''; width:4px; height:70px; background:#a26c37; display:inline-block; } .song-loader:after{ margin-left:10px; animation:dancingBars 900ms 500ms ease-in infinite; } .song-loader:before{ margin-left:-10px; background:#a26c37; animation:dancingBars 700ms 100ms ease-in infinite; } @keyframes dancingBars{ 0%,100%{ transform:scaleY(1); opacity:1; } 50%{ transform:scaleY(0.2); opacity:0.4; } 80%{ transform:scaleY(1.2); opacity:0.9; } } div.wrappertt:after{ position:absolute; content:''; width:95%; height:15px; background:rgba(0, 55, 49, 0.81); display:block; left:2.5%; bottom:-37px; border-radius:100%; -webkit-filter:blur(2px); -moz-filter:blur(2px); -ms-filter:blur(2px); filter:blur(2px); z-index:-1; } .music-cover{ height:42.5%; background:#4080ff; text-align:center; overflow:hidden; } .cover-img{ width:90%; margin-top:30px; border-radius:8px; border-top:2px solid rgba(255,255,255,0.4); opacity:0.9; } .album-controls{ position:relative; height:42.5%; background:#4080ff; border-top:2px solid rgba(255,255,255,0.2); text-align:center; overflow:hidden; } .album-img{ width:100%; margin-top:-195px; border-radius:8px; border-top:2px solid rgba(255,255,255,0.4); -webkit-filter:blur(16px); -moz-filter:blur(16px); -ms-filter:blur(16px); filter:blur(16px); } .album-info{ position:absolute; width:100%; background:transparent; top:0; } .album-info span{ width:100%; display:block; text-align:center; background:transparent; text-transform:uppercase; } span.album-title{ color:#fff; font-size:19px; font-weight:bold; margin-top:45px; } span.song-title{ font-size:18px; margin-top:21px; color:rgba(255,255,255,1); } .song-utility{ margin-top:25px; } .h5555{ color:rgba(255,255,255,0.7); background:transparent; padding:10px 10px; font-size:35px; margin:0 10px; } span .fa-retweet, span .fa-home{ color:rgba(255,255,255,1); } .music-controls{ position:relative; height:20%; background:rgba(255,255,255,1); border-radius:0px 0px 14px 14px; -50px #c0bf99; /*overflow:hidden;*/ } .music-controls > span{ display:block; height:100%; float:left; text-align:center; background:#fff; line-height:580%; transition:all 0.3s linear; } .music-controls .seek-bar, .music-controls:before{ position:absolute; width:100%; height:7px; content:''; display:block; clear:both; border-bottom:1px solid rgba(0,0,0,0.2); } .music-controls .seek-bar{ width:0%; height:3px; top:1.5px; background:#4080ff; } .music-controls .song-buffer{ position:absolute; display:inline-block; width:0%; height:3px; top:2px; left:0; background:#4080ff; opacity:0.4; } .music-controls:before{ background:rgba(255,255,255,1); } .knot{ position:absolute; z-index:99; top:-6px; right:-8px; width:8px; height:8px; background:#fff; border-radius:100%; border:4px solid #4080ff; display:inline-block; transition:all 300ms ease-in-out; opacity:1; } .music-controls span.song-current-time{ width:30%; font-size:18px; color:#4080ff; border-radius:0 0 0 14px; opacity:0; transition:opacity 200ms ease-in; } .music-controls span.song-duration{ opacity:0; transition:opacity 200ms ease-in; } .music-controls span.play{ width:70%; font-size:18px; text-align:left; border-radius:0 0 14px 0; } .music-controls span.play:hover{ } .fa-play, .fa-pause{ position:relative; color:#4080ff !important; top:6px; left:45px; transition:all 0.3s linear; cursor:default; pointer-events:none; opacity:0; transition:opacity 300ms ease-in; margin-left: -14px; } .fa-play:hover, .fa-pause:hover{ color:#4080ff !important; } .music-controls span.song-duration{ position:absolute; font-size:18px; background:transparent; color:#4080ff; right:40px; } #music-player{ opacity:0; position:absolute; top:-100px; } .is-animate { transition:width 300ms linear; } div.credit { position: absolute; padding: 0px 10px; padding-bottom: 8px; height: 15px; right: 5px; top: 5px; display: inline-block; background: rgba(255, 255, 255, 0.2); font-size: 7px; font-weight: bold; color: rgba(0, 0, 0, 0.7); border: 1px solid rgba(0, 0, 0, 0.1); cursor: default; } div.credit:hover{ border: 1px solid rgba(0, 0, 0, 0.2); } div.credit img { position: relative; width: 14px; margin-left: 3px; top: 4px; }
Bước 2: Chèn JS này vào trước </head> của Blogspot:
<script>
// code by TKN BLOG - jquery by W3schools
var _audio = $("#music-player")[0],
_audioDuration = 0,
_currentTime = 0,
_buffered = 0,
_buuferPlayTime = 5;
$(".music-controls .fa").on("click", function() {
var $this = $(this);
$(".music-controls .seek-bar").css("animation-play-state", "running");
if ($this.hasClass("fa-play")) {
$this.removeClass("fa-play").addClass("fa-pause");
_audio.play();
$(".music-controls .seek-bar").addClass("is-animate");
} else {
$(".music-controls .seek-bar").css("animation-play-state", "paused");
$this.removeClass("fa-pause").addClass("fa-play");
$(".music-controls .seek-bar");
_audio.pause();
}
});
var _setAudioDuration = setInterval(function() {
_audioDuration = _audio.duration;
if (_audioDuration > 0) {
$(".song-duration").html(formatAudio(_audioDuration)).css("opacity", 1);
$(".song-current-time").css("opacity", 1);
clearInterval(_setAudioDuration);
}
}, 500);
var _animateSeek = setInterval(function() {
if ($(".fa").hasClass("fa-pause")) {
var _percent = (_audio.currentTime * 100) / _audioDuration;
$(".is-animate").css("width", _percent + "%");
$(".song-current-time").html(currentTime(_audio.currentTime));
}
}, 500);
_audio.onended = function() {
setTimeout(function() {
_audio.currentTime = 0;
$(".song-current-time").html(currentTime(_audio.currentTime));
$(".is-animate").css("width", "0%");
$(".music-controls .fa").removeClass("fa-pause").addClass("fa-play");
}, 500);
};
var _checkBuffer = setInterval(function() {
if (_audioDuration > 0) {
_buffered = (_audio.buffered.end(_audio.buffered.length - 1) * 100) / _audio.duration;

$(".music-controls .song-buffer").css("width", _buffered + "%");
if (_buffered > _buuferPlayTime) {
$(".wrappertt").addClass("showMP");
$(".fa").css({
"opacity": "1",
"pointer-events": "auto"
});
}
if (_buffered == 100) {
clearInterval(_checkBuffer);
}
}
}, 500);

function currentTime(songActivity){
var _mprefix = "";
var _sprefix = "";
var _secs = songActivity;
var _min = Math.floor(_secs/60);

var _time = Math.floor(((_secs/60) - _min )*60);
if(_min < 10){
_mprefix = "0";
}
if(_time < 10){
_sprefix = "0";
}
return _mprefix + _min + ":" + _sprefix + _time;
}

function formatAudio(songActivity) {
var _mprefix = "",
_sprefix = "",
_secs = songActivity,
_min = Math.floor(_secs / 60),
_time = Math.floor(((_secs / 60) - _min) * 60);

if (_min < 10) {
_mprefix = "0";
}
if (_time < 10) {
_sprefix = "0";
}
return _mprefix + _min + ":" + _sprefix + _time;
}
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-109680738-1');
</script>
Bước 3: Vào bố cục > Thêm tiện ích > HTML/Javascript:

<div class="wrappertt">
<div class="music music-cover">
<img src="LINK ẢNH" alt="" class="cover-img" />
</div>
<div class="music album-controls">
<img src="LINK ẢNH" alt="" class="album-img" />
<div class="album-info">
<span class="album-title">Người lạ ơi</span>
<span class="song-title">Khanhblogger.com</span>
<span class="song-utility">
<i class="fa fa-home h5555" aria-hidden="true"></i>
<i class="fa fa-random h5555" aria-hidden="true"></i>
<i class="fa fa-retweet h5555" aria-hidden="true"></i>
<i class="fa fa-clock-o h5555" aria-hidden="true"></i>
</span>
</div>
</div>
<div class="music music-controls">
<span class="seek-bar">
<span class="knot"></span>
</span>
<span class="song-buffer"></span>
<span class="song-current-time">00:00</span><span class="play">
<i class="fa fa-play h5555" aria-hidden="true"></i>
<span class="song-duration">00:00</span>
</span>
</div>
</div>
<audio controls id="music-player" preload="auto">
<source src="https://f9-stream.nixcdn.com/NhacCuaTui958/NguoiLaOiAvaxcRemix-KarikOrangeSuperbrothers-5353998.mp3?st=u6gO4Ua7gVbUy7O8_3fydQ&e=1516867597&t=1516781197585" type="audio/mpeg">
</source></audio>
Thay LINK ẢNH thành link ảnh bài hát, thay phần in đậm dưới cùng thành link nhạc (dạng .MP3) và các thông tin khác =)))

Đây là một máy nghe nhạc, một Music Player tuyệt đẹp cho blogspot. Hi vọng với Widget này, blog bạn sẽ ngầu và chuyên nghiệp hơn.
Chúc các bạn thành công !
Bạn và người khác
30 bình luận
Bạn và người khác
30 bình luận

বিজ্ঞান đã cập nhật trạng thái của anh ấy đã chia sẻ một Theme

Đã lâu rồi Khanh không viết thủ thuật cho các bạn vì một vài lý do :v Hôm nay thay vì viết thủ thuật như mọi khi thì hôm nay mình xin được chia sẻ Template ảnh bìa cực đẹp cho blogspot chuẩn Responsive cho những bạn đam mê làm blog ảnh bìa !

theme-anh-bia
www.anhbiavn.com



Thông tin về theme
  • Thiết kế bởi: Dii Nô (Bảo Khánh)
  • Thiết kế ban đầu: Admin Hiếu (Hồ Quốc Hiếu)
  • Phiên bản: 2.0
  • Responsive: Có - Tích hợp mọi thiết bị
  • Giá: 300.000đ - Miễn phí
  • Hỗ trợ: Không
  • Mã hóa: Không
  • Chủ đề phù hợp: Ảnh bìa, tâm sự, tản mạn
Đây là một theme đối với mình là rất đẹp, phù hợp cho những bạn có ý định làm blog ảnh bìa  và giá cả thì miễn phí ! Để sở hữu được theme này rất đơn giản, các bạn chỉ cần share bài này lên facebook và comments link share bên dưới kèm email để mình gửi theme nhé !

Form comments:
Link share fb:
Email nhận theme: 
Bạn và người khác
77 bình luận
Bạn và người khác
77 bình luận
Khanh Blogger