In addition to Preloader Framework7 also comes with fancy animated determinate and infinite/indeterminate progress bars to indicate activity.
By default, Preloader available in two colors: the default is for a light background and another one for dark background. The HTML is pretty easy, just create any element (for example?<span>) with "preloader" class:
When progress bar is determinate it indicates how long an operation will take when the percentage complete is detectable.
Let‘s look at layout of determinate progress bar:
or:
Where?data-progress="20"?- currently set progress (in percents). Note that this data attribute sets progress only on page load. If you need to change it later it should be done via API
When progress bar is infinite/indeterminate it requests that the user wait while something finishes when it’s not necessary to indicate how long it will take.
Let‘s look at layout of infinite progress bar:
or:
Multi-color:
Progress Bar comes with JavaScript API that allows you to control Progress Bar‘s progress, show and hide it. Let‘s look on appropriate App‘s properties and methods:
myApp.setProgressbar(container, progress, speed) - set progress for Determinate Progress Bar.
‘body‘
myApp.hideProgressbar(container) - hide Progress Bar.
‘body‘
myApp.showProgressbar(container, progress, color) - create and show or just show (if already presented)?Determinate Progress Bar
‘body‘
myApp.showProgressbar(container, color) - create and show or just show (if already presented)?Infinite Progress Bar
‘body‘
myApp.showProgressbar(progress, color) - create and show or just show (if already presented)?Determinate Progress Bar?as overlay element(<body>
‘s child)
myApp.showProgressbar() - create and show or just show (if already presented)?Infinite Progress Bar?as overlay element(<body>
‘s child)
?
移动端安卓和IOS开发框架Framework7教程-进度条Progress Bar
原文:http://zaixianshouce.iteye.com/blog/2298553