Font Việt hóa miễn phí

Menu
  • Home
  • Fanpage
  • Fonts
    • Sans-serif
    • Serif
    • Script
    • Handwrite
    • Brush
  • Chủ đề Fonts
    • Magazine
    • Poster
    • Dropmenu 3
    • Dropmenu 4
    • Dropmenu 5
  • Graphic
    • Action
    • Brush
    • Pattern
    • Style
    • Texture
  • Button
  • Error
  • Surprise Me
font tiếng việt Code nút "Back To Top" đẹp sử dụng jQuery cho trang web

Code nút "Back To Top" đẹp sử dụng jQuery cho trang web

Để tạo điều kiện thuận lợi cho khách tham quan khi đọc xong bài có thể quay về đầu trang nhanh chóng đặc biệt với những trang web có phần nội dung khá dài, bạn phải tạo cho trang web một nút bấm phía dưới cuối trang, khi bấm vào nút này lập tức sẽ đưa khách "về đầu trang" giúp người đọc tiết kiệm thời gian khi phải rê chuột lên trên cùng của trang. Trong bài viết này,BachKhoamedia cung cấp cho bạn đoạn code tạo nút "Back to top" hỗ trợ chức năng trên,đặc biệt có sử dụng hiệu ứng trượt từ jQuery rất đẹp mắt và ẩn đi khi bạn đang ở đầu trang( khi mà bạn không cần dùng tới nó :D). 



Các bạn làm theo các bước sau :
  1. Đăng nhập Blogger > Layout ( Bố cục)
  2. Chọn Add a gadget(Thêm phần tử mới)
  3. Chọn HTML/JavaScript
  4. Thêm đoạn code sau vào ô HTML/JavaScript
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script type="text/javascript" >/*********************************************** ***********************************************/var scrolltotop={     //startline: Integer. Number of pixels from top of doc scrollbar is scrolled before showing control     //scrollto: Keyword (Integer, or "Scroll_to_Element_ID"). How far to scroll document up when control is clicked on (0=top).     setting: {startline:100, scrollto: 0, scrollduration:1000, fadeduration:[500, 100]},    controlHTML: '<img src="https://lh3.googleusercontent.com/-2rZeDVpenHM/T860SMKImAI/AAAAAAAAAv8/canD9JoxLec/s128/005017-blue-white-pearl-icon-arrows-arrow2-upload.png" />', //HTML for control, which is auto wrapped in DIV w/ ID="topcontrol"     controlattrs: {offsetx:5, offsety:5}, //offset of control relative toleft/ bottom of window corner     anchorkeyword: '#top', //Enter href value of HTML anchors on the page that should also act as "Scroll Up" links    state: {isvisible:false, shouldvisible:false},    scrollup:function(){         if (!this.cssfixedsupport) //if control is positioned using JavaScript             this.$control.css({opacity:0}) //hide control immediately after clicking it         var dest=isNaN(this.setting.scrollto)? this.setting.scrollto : parseInt(this.setting.scrollto)         if (typeof dest=="string" && jQuery('#'+dest).length==1) //check element set by string exists             dest=jQuery('#'+dest).offset().top         else             dest=0         this.$body.animate({scrollTop: dest}, this.setting.scrollduration);     },    keepfixed:function(){         var $window=jQuery(window)         var controlx=$window.scrollLeft() + $window.width() - this.$control.width() - this.controlattrs.offsetx         var controly=$window.scrollTop() + $window.height() - this.$control.height() - this.controlattrs.offsety         this.$control.css({left:controlx+'px', top:controly+'px'})     },    togglecontrol:function(){         var scrolltop=jQuery(window).scrollTop()         if (!this.cssfixedsupport)             this.keepfixed()         this.state.shouldvisible=(scrolltop>=this.setting.startline)? true : false         if (this.state.shouldvisible && !this.state.isvisible){             this.$control.stop().animate({opacity:1}, this.setting.fadeduration[0])             this.state.isvisible=true         }         else if (this.state.shouldvisible==false && this.state.isvisible){             this.$control.stop().animate({opacity:0}, this.setting.fadeduration[1])             this.state.isvisible=false         }     },         init:function(){         jQuery(document).ready(function($){             var mainobj=scrolltotop             var iebrws=document.all             mainobj.cssfixedsupport=!iebrws || iebrws && document.compatMode=="CSS1Compat" && window.XMLHttpRequest //not IE or IE7+ browsers in standards mode             mainobj.$body=(window.opera)? (document.compatMode=="CSS1Compat"? $('html') : $('body')) : $('html,body')             mainobj.$control=$('<div id="topcontrol">'+mainobj.controlHTML+'</div>')                 .css({position:mainobj.cssfixedsupport? 'fixed' : 'absolute', bottom:mainobj.controlattrs.offsety, left:mainobj.controlattrs.offsetx, opacity:0, cursor:'pointer'})                 .attr({title:'Scroll Back to Top'})                 .click(function(){mainobj.scrollup(); return false})                 .appendTo('body')             if (document.all && !window.XMLHttpRequest && mainobj.$control.text()!='') //loose check for IE6 and below, plus whether control contains any text                 mainobj.$control.css({width:mainobj.$control.width()}) //IE6- seems to require an explicit width on a DIV containing text             mainobj.togglecontrol()             $('a[href="' + mainobj.anchorkeyword +'"]').click(function(){                 mainobj.scrollup()                 return false             })             $(window).bind('scroll resize', function(e){                 mainobj.togglecontrol()             })         })     } }scrolltotop.init()</script>


Ở dòng chữ màu đỏ, các bạn có thể thay đổi bằng hình ảnh khác. 
Unknown
font tiếng việt
9/4/13
  • Tweet
  • Share
  • Share
  • Share
  • Share

About Nguoi Chia Se

Vâng ! Tôi chia sẻ những thứ tôi có.

Related Posts

Total Tayangan Laman

  • …

  • …

Label

  • Sans-Serif
  • Script
  • Serif
Việt-Font. Được tạo bởi Blogger.

Labels

behance (2) Branding (4) brush (2) brushfont (1) Caligraphy (4) Character Design (2) Desktop Wallpaper (2) Drawing (1) film's font (1) font chữ đẹp (1) Font Nexa (1) font tiếng việt (29) font việt (3) font việt hóa (6) font việt hóa. (1) Graphic Design (5) handwrite (1) headlines (1) Hình nền Desktop (1) Illustration (3) lettering (1) Logo (3) magazine (1) myfonts (1) Nexa Việt hóa (1) Photo Quote (1) poster (1) premium font (1) sans serif (7) sans serif việt hóa (2) Sans-Serif (4) Sans-Serif Việt hóa (4) Script (12) Script việt hóa (6) Serif (8) serif slab (1) serif việt hóa (4) Typography (8) việt hóa (7)

Blogroll

Recent Posts

Blogger news

Labels

  • behance
  • Branding
  • brush
  • brushfont
  • Caligraphy
  • Character Design
  • Desktop Wallpaper
  • Drawing
  • film's font
  • font chữ đẹp
  • Font Nexa
  • font tiếng việt
  • font việt
  • font việt hóa
  • font việt hóa.
  • Graphic Design
  • handwrite
  • headlines
  • Hình nền Desktop
  • Illustration
  • lettering
  • Logo
  • magazine
  • myfonts
  • Nexa Việt hóa
  • Photo Quote
  • poster
  • premium font
  • sans serif
  • sans serif việt hóa
  • Sans-Serif
  • Sans-Serif Việt hóa
  • Script
  • Script việt hóa
  • Serif
  • serif slab
  • serif việt hóa
  • Typography
  • việt hóa

Popular Posts

  • Fester Bold VIệt hóa
    FESTER là một typeface in hoa toàn bộ, được chia sẻ miễn phí tại https://www.behance.net/galle…/31224235/FESTER-Free-Typeface . Fo...
  • [Font Việt hóa] Auther Typeface
     Auther Typeface là một font vừa hiện đại vừa cổ kính, mang hơi hướng hand lettering cầu kì, cùng phong cách vintage đầy tinh ...
  • Vanitas Regular tiếng Việt
    About this font family Vanitas is an elegant high contrast contemporary sans. It is rooted in the style of a classic didone, exclud...
  • [CVH] Angry Bird font
    Font được sử dụng trong bộ phim Angry Bird. Ấn nút DOWNLOAD để tải về miễn phí
  • Sketch, Logo by Kirill Richert on Behance
  • Typo Slab Serif tiếng Việt
    Font Typo Slab Serif phiên bản tiếng Việt DOWNLOAD
  • Reina Family Font
    Reina Family Info:  http://www.myfonts.com/fonts/argentina-lian-types/reina/ Reina 12, Reina 12 Pro Reina 36, Reina 36 Pro Reina 7...
  • [CVH] Rosaline - Indian Type
    Info:  https://www.myfonts.com/fonts/indian-type-foundry/rosaline/
  • Steelfish
    LƯU Ý:  FONT CHƯA VIỆT HÓA
  • Bundle of Fonts and Graphics - 542654

Like Us On Facebook

Popular Posts

  • Fester Bold VIệt hóa
    FESTER là một typeface in hoa toàn bộ, được chia sẻ miễn phí tại https://www.behance.net/galle…/31224235/FESTER-Free-Typeface . Fo...
  • [Font Việt hóa] Auther Typeface
     Auther Typeface là một font vừa hiện đại vừa cổ kính, mang hơi hướng hand lettering cầu kì, cùng phong cách vintage đầy tinh ...
  • Vanitas Regular tiếng Việt
    About this font family Vanitas is an elegant high contrast contemporary sans. It is rooted in the style of a classic didone, exclud...
  • [CVH] Angry Bird font
    Font được sử dụng trong bộ phim Angry Bird. Ấn nút DOWNLOAD để tải về miễn phí
  • Sketch, Logo by Kirill Richert on Behance
  • Typo Slab Serif tiếng Việt
    Font Typo Slab Serif phiên bản tiếng Việt DOWNLOAD
  • Reina Family Font
    Reina Family Info:  http://www.myfonts.com/fonts/argentina-lian-types/reina/ Reina 12, Reina 12 Pro Reina 36, Reina 36 Pro Reina 7...
  • [CVH] Rosaline - Indian Type
    Info:  https://www.myfonts.com/fonts/indian-type-foundry/rosaline/
  • Steelfish
    LƯU Ý:  FONT CHƯA VIỆT HÓA
  • Bundle of Fonts and Graphics - 542654
Copyright © 2015 Font Việt hóa miễn phí
Created By Arlina Design | Distributed By My Blogger Themes