Minh họa:
Thao tác:
1. Đăng nhập Blogspot.
2. Vào Thiết kế =>; Mẫu =>; Chỉnh sửa HTML.
4. Dán đoạn Code dưới đây vào ngay trên thẻ </body> trong khung Template CSS.
<style type='text/css'> #bttop{ border:1px solid #4adcff; background:#24bde2; text-align:center; padding:5px; position:fixed; bottom:35px; right:10px; cursor:pointer; display:none; color:#fff; font-size:11px; font-weight:900; } #bttop:hover{border:1px solid #ffa789;background:#ff6734;} </style> <div id='bttop'>LÊN ĐẦU TRANG</div> <script src='https://bongnguoilangle.googlecode.com/files/jquery.min-1.8.2.js' type='text/javascript'> </script> <script type='text/javascript'> $(function(){$(window).scroll(function(){if($(this).scrollTop()!=0){$('#bttop').fadeIn();}else{$('#bttop').fadeOut();}});$('#bttop').click(function(){$('body,html').animate({scrollTop:0},800);});});</script>
Bạn có thể tùy chỉnh các giá trị màu sắc và nội dung LÊN ĐẦU TRANG theo ý thích.
5. Lưu mẫu và xem kết quả.
Chúc các bạn thành công!
BNLL
No comments:
Post a Comment