Code chuyển hướng - redirect blog/website bằng HTML, đây là một thủ thuật đơn giản, nhanh và gọn. Không dùng nhiều code như cách chuyển hướng bằng Jquery, đơn giản, nhưng thủ thuật này vẫn đảm bảo chuyển hướng chính xác trong thời gian bạn đã đặt trước.
Code chuyển hướng website/blog bằng HTML

Các bước thực hiện

Có lẽ, khi xem xong bài viết này bạn sẽ có suy nghĩ là ồ, mình bị làm sao mà không gộp 2 bài viết vào cho nhanh trong khi thao tác thực hiện của bài viết này quá đơn giản. Hi vì mình muốn tạo sự mạch lạc, mỗi bài viết có ý đồ riêng.
Các bạn thực hiện thêm đoạn code sau vào giữa cặp thẻ <head>...</head> của Templates.
1<meta http-equiv="refresh" content="1;url=http://chubangaiti.blogspot.com/">
Bạn lưu ý ở đây: 1 là thời gian chuyển hướng (đơn vị là giây-0.5 giây cũng được bạn nhé!),  thay http://chubangaiti.blogspot.com/ thành URL bạn muốn chuyển hướng tới.

Lời kết

Đây là một thủ thuật Blogger đơn giản hơn so với cách làm trước và phù hợp với nhiều website/blog không chỉ riêng những website/blog có sử dụng Jquery. Thật vậy, hãy thử áp dụng cho Blog của mình bạn nhé!
Chúc Các Bạn Thành Công!
Next
Hướng dẫn đăng ký và sử dụng Github lưu trữ Javascript và CSS cho Blogger
Previous
Bài Đăng Phổ Biến Nhiều Màu Sắc Cho Blogger - Blogspot 1. Các bạn vào Blogger -> Mẫu -> Chỉnh sửa html2. Tiếp tục các bạn tìm thẻ đóng ]]> hay thẻ đóng và đặt đoạn CSS sau vào trước thẻ đóng đó CSS/* Popular Posts */.PopularPosts .item-thumbnail{float:none;margin:0 0 10px}.PopularPosts .item-title{background:rgba(0,0,0,0.5);position:absolute;display:block;clear:both;z-index:50;top:0;left:0;right:0;bottom:0;padding:15px;transition:all .4s;}.PopularPosts .item-title:hover{background:rgba(0,0,0,.2)}.PopularPosts .item-title a{color:rgba(255,255,255,0);font-weight:700;font-size:120%;text-shadow:0 0 5px rgba(0,0,0,0)}.PopularPosts .item-title:hover a,.PopularPosts .item-title a:hover{color:rgba(255,255,255,1);text-shadow:0 0 5px rgba(0,0,0,.3)}.PopularPosts .widget-content ul li img{translate(0,0) scale(1.0);transition:all .8s linear}.PopularPosts .widget-content ul li:hover img{transform:translate(0,-20px) scale(1.05);transition:all 3.6s linear;}.PopularPosts img{display:block;height:auto;width:100%;padding:0;backface-visibility:hidden;}.PopularPosts .item-snippet{display:none;}.PopularPosts ul li .item-content{position:relative;overflow:hidden;}.PopularPosts ul{padding:0;line-height:normal;counter-reset:count;}.PopularPosts .widget-content ul li{position:relative;padding:10px 0;overflow:hidden;max-height:100px;transition:all .4s;}.PopularPosts .widget-content ul li:before{color:#fff;counter-increment:count;content:counter(count);position:absolute;right:-15px;top:-5px;font:bold 80px/1 Sans-Serif;z-index:51;transition:all .4s;}.PopularPosts .widget-content ul li:hover:before{right:-55px;}.PopularPosts ul li:nth-child(1) .item-title {background:rgba(221,25,29,0.5);}.PopularPosts ul li:nth-child(2) .item-title {background:rgba(141,187,144,0.5);}.PopularPosts ul li:nth-child(3) .item-title {background:rgba(39,169,255,0.5);}.PopularPosts ul li:nth-child(4) .item-title {background:rgba(192,202,51,0.5);}.PopularPosts ul li:nth-child(5) .item-title {background:rgba(26,35,126,0.5);}.PopularPosts ul li:nth-child(6) .item-title {background:rgba(0,188,212,0.5);}.PopularPosts ul li:nth-child(1) .item-title:hover,.PopularPosts ul li:nth-child(2) .item-title:hover,.PopularPosts ul li:nth-child(3) .item-title:hover,.PopularPosts ul li:nth-child(4) .item-title:hover,.PopularPosts ul li:nth-child(5) .item-title:hover,.PopularPosts ul li:nth-child(6) .item-title:hover{background:rgba(0,0,0,0.2);}Lưu ý: Các bạn nên xóa hết các Css liên quan đến Popular Post cũ trước nha. Nếu các bạn không biết thì tìm kiếm với từ Popular là ra3. Tiếp các bạn dán đoạn javascript sau vào trước thẻ đóng JS4. Save Template (Lưu Mẫu) lại 5. Để thưởng thức thành quả thì các bạn vào Blogger -> Bố cục -> Thêm tiện ích ->Bài đăng phổ biến -> chỉnh các thông số như hình:Chú ý: các bạn có thế thay đổi các thông số sauTiêu ĐềHiện thị tối đa .... bài đăngNếu các bạn ko muốn hiện thị màu- Từ đoạn code CSS trên các bạn xóa toàn bộ chữ có màu xanh lá cây là xong Mặc định hiên thị quá 6 bài sẽ mất màu sắc, vì vậy nếu bạn chỉnh nhiều hơn 6 bài thì các bạn phài thêm mã màu cho bài thứ 7 trở đi- Cũng ỡ đoạn code CSS trên các bạn thêm sau vào sau dòng .PopularPosts ul li:nth-child(6) .item-title {background:rgba(0,188,212,0.5);}CSS.PopularPosts ul li:nth-child(7) .item-title {background:rgba(0,188,212,0.5);}Các bạn thay mã màu có chữ đỏ thành mả màu bạn muốn (mã màu định dạng ở rgba nha) Tương tự cho bài 8, thay số 7 thành 8, bài 9, bài 10Để hiển thị được - Các bạn thêm dòng sauCSS.item-title:hover,.PopularPosts ul li:nth-child(7)vào trong đoạn sauCSS.PopularPosts ul li:nth-child(1) .item-title:hover,.PopularPosts ul li:nth-child(2) .item-title:hover,.PopularPosts ul li:nth-child(3) .item-title:hover,.PopularPosts ul li:nth-child(4) .item-title:hover,.PopularPosts ul li:nth-child(5) .item-title:hover,.PopularPosts ul li:nth-child(6) .item-title:hover{background:rgba(0,0,0,0.2);}Sau đó nó sẽ thành như thế này:CSS.PopularPosts ul li:nth-child(1) .item-title:hover,.PopularPosts ul li:nth-child(2) .item-title:hover,.PopularPosts ul li:nth-child(3) .item-title:hover,.PopularPosts ul li:nth-child(4) .item-title:hover,.PopularPosts ul li:nth-child(5) .item-title:hover,.PopularPosts ul li:nth-child(6) .item-title:hover,.PopularPosts ul li:nth-child(7) .item-title:hover{background:rgba(0,0,0,0.2);}
Axact

Chu Bằng Monkey

Tôi là Chu Bằng, tôi đang làm và phát triển tại KenhVietPro.Blogspot.Com.
Tôi yêu thích lập trình Wap/Web và chia sẻ code , kiến thức IT.

Nhận Xét:

0 comments: