jQuery Plugin – Pace

在很多年以前,大家一定都看過整個利用Flash來完成的網頁,因為這樣的網頁檔案會比較大一些,所以在進入時總會有個讀取進度的畫面來讓人判斷目前頁面讀取了多少,但在如今行動裝置處處皆是的狀況之下,全Flash的頁面已經不符合現代人的閱讀需求了,所以現在流行的「單頁式網頁」就僅僅是利用HTML、CSS、javascript…等前端網頁語法來完成的,但如果希望網頁檔案漂亮,又要符合RWD(自適應網頁設計),就還是有可能會讓整個網頁載入的檔案變得比較大一些,今天就跟大家來分享一個jQuery的外掛,這個外掛可以很方便地幫我們在這樣的頁面上加上載入進度,而且不用寫任何的程式唷!

pace 官網截圖
pace 官網截圖

這個外掛的名稱是Pace,大家可以先到他的官方網頁備用載點)上面去下載所需要的PACE.JS和CSS,而CSS的部分主要是拿來決定載入進度的外觀,官網大概提供了14種樣式的CSS讓我們使用。

pace 官網下載說明圖
pace 官網下載說明圖

下載完成後只需要將CSS和JS引用進我們的網頁即可,比較需要注意的是因為這是網頁載入進度,所以最後須要把網頁上傳到網路空間之後,才可以比較正確的看到讀取的效果。

<script type="text/javascript" src="pace.min.js"></script>
<link rel="stylesheet" type="text/css" href="pace.css"/>

參考馬老師製作的範例網頁

You may also like...

14,644 Responses

  1. Всем привет! Подскажите, где почитать разные блоги о недвижимости? Пока нашел https://glatt-nsk.ru

  2. Flum pebble表示:

    Having read this I believed it was really enlightening. I appreciate you finding the time and energy to put this information together. I once again find myself spending a lot of time both reading and commenting. But so what, it was still worth it!

  3. Hjajei表示:

    buy lasuna online – buy himcolin generic himcolin price

  4. You made some really good points there. I checked on the net for more information about the issue and found most people will go along with your views on this website.

  5. An intriguing discussion is definitely worth comment. I do think that you ought to write more about this subject matter, it may not be a taboo subject but typically people do not speak about such issues. To the next! Kind regards!

  6. mysgame表示:

    Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You obviously know what youre talking about, why waste your intelligence on just posting videos to your weblog when you could be giving us something enlightening to read?

  7. This article really got me thinking about…검색엔진최적화 메타태그

  8. kontol表示:

    Great post. I will be facing a few of these issues as well..

  9. Porn表示:

    Buy Drugs

  10. Sex表示:

    Viagra

  11. Porn表示:

    Pornstar

  12. lease option表示:

    Hello! I could have sworn I’ve been to this site before but after looking at many of the posts I realized it’s new to me. Regardless, I’m definitely happy I discovered it and I’ll be book-marking it and checking back regularly!

  13. Drugs表示:

    Pornstar

  14. SEO表示:

    You’ve provided a fresh take on this issue.구글상위노출 회사

  15. lease option表示:

    This blog was… how do you say it? Relevant!! Finally I’ve found something that helped me. Cheers.

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。