基于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;
}
# 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