react 翻页时钟计时器插件
从NPM下载包基于react开发的一个翻页动画效果非常漂亮的计时器。 预览地址:http://xiaxiangfeng.github.io/flip-clock/index.html
npm i react-flip-clock
使用实例
引入包
import Clock from 'react-flip-clock' const Index = () => { return ( <div> <Clock /> </div> ) } render( <Index />, document.getElementById('app') ) 自定义样式 编写样式覆盖即可
/*宽高*/ .flip-clock-wrapper ul { width: 60px; height: 90px; } /*背景颜色、字体大小*/ .flip-clock-wrapper .inn { background-color: #502d2d; font-size: 70px; } Build Setup
# install dependencies npm install # serve with hot reload at localhost:8080 npm run dev # build for production with minification npm run build # build for production and view the bundle analyzer report npm run build --report # run unit tests npm run unit # run all tests npm test
版权声明:
1、该文章(资料)来源于互联网公开信息,我方只是对该内容做点评,所分享的下载地址为原作者公开地址。2、网站不提供资料下载,如需下载请到原作者页面进行下载。