扫一扫分享
精心制作了一系列用css动画制作的加载效果,既可以作为html / css代码片段,也可以轻松定制为vue.js组件。
安装
npm install --save epic-spinners
用法;Vue.js用法示例
<template>
<div id="app">
<atom-spinner
:animation-duration="1000"
:size="60"
:color="'#ff1d5e'"
/>
</div>
</template>
<script>
// To use minified css and js files instead of .vue single file components:
// import 'epic-spinners/dist/lib/epic-spinners.min.css'
// import {AtomSpinner} from 'epic-spinners/dist/lib/epic-spinners.min.js'
// To get tree shaking from webpack (won't import all spinners when you only need one)
// import AtomSpinner from 'epic-spinners/src/components/lib/AtomSpinner'
import {AtomSpinner} from 'epic-spinners'
export default {
components: {
AtomSpinner
}
}
</script>
手机预览