內容簡介
此外掛基於並使用CountUp.js,這是一個無依賴性、輕量級的JavaScript “class”,可用於快速創建以更有趣方式顯示數字數據的動畫。
參考:https://inorganik.github.io/countUp.js/
使用和配置
只需將以下短碼添加到您的文章、頁面或小工具中[countup]
1)基本自定義可以通過短碼參數實現
短碼接受以下參數
start:開始計數的數字
end:計數器結束的數字
decimals:要顯示的小數位數
duration:計數器要進行的時間或要捨入的時間
[countup start=”5″ end=”100″ decimals=”3″ duration=”5″]
2)可以通過Countup.js選項頁中的設置面板進行進一步調整,可調整以下選項:
`
easing:
grouping:將內容分組(例如,千位分隔符)
seperator:(默認為逗號)
decimal:使用的小數符號
prefix:(串前面的字符)
suffix:(串後面的字符)
`
外掛標籤
開發者團隊
原文外掛簡介
This plugin is based on and utilizes CountUp.js, which is a dependency-free, lightweight JavaScript “class” that can be used to quickly create animations that display numerical data in a more interesting way.
Based off of: https://inorganik.github.io/countUp.js/
Usage & Configuration
Simply add the following shortcode to your posts, pages or widgets [countup]
1) Basic customization can occur through the shortcode arguments
The shortcode accepts the following arguments
start: number to begin the counter from
end: number to end the counter at
decimals: # of decimal places to show
duration: time in second or the counter to round
[countup start=”5″ end=”100″ decimals=”3″ duration=”5″]
2) Further adjustments can be made through the settings panel, in the Countup.js options page, for the following options:
`
easing:
grouping: groups the content into sections (eg. 1,000 vs 1000)
seperator: (default is comma)
decimal: symbol to use for decimal spot
prefix: ( character(s) at beginning of string )
suffix: ( character(s) at end of string )
`
